OpenWrt Forum Archive

Topic: Explain Kamikaze

The content of this topic has been archived on 13 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Can someone explain how Kamikaze works, the documentation is just appalling on the subject.

E.g. how are routes handled? The default configuration is expecting a DHCP server to supply a IP address at the WAN port, but where does it say that in the configuration?

moreover there a two vlan configurations but little information on how they are connected. Also, when does traffic enter the CPU or does it always? What are the performance implications of routing/switching.

I'm getting tiered of trying to reverse engineer the how things work off completely undocumented configuration files.

I think the wiki explains a lot of this.

What are the performance implications of routing/switching.

Switching: none.
Routing: it's really complicated to answer.  Just configure your network, fire up a packet generator, and see what happens.

(Last edited by exobyte on 20 Jan 2008, 21:23)

The Wiki is crap, have you read it? I have a million times, it's good at somethings, but right now, it's no good at all.

for instance where do you find info on this configuration?

config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0

So far, this is what I've been able to reverse engineer from reading the configuration for 2 days.
It's somehow connected to vlan0. it's a bridge, I do not know to what though. Also what other valid options there are for "proto" and what do they mean?

I want to bypass as much of the router as possible, and just make it to a switch, which wireless computers can connect to as well. I however still want the router to grab it's own IP of an DHCP server which will be connected to the switch. If that's even possible. I'm sure it is, but how? heck, the documentation does not say. I don't feel for trail and error either.

the interface is a bridge with the static ip address of 192.168.1.1.  One of the interfaces on the bridge is eth0.0.

This part is undocumented: if your wireless config has the same network name (lan), it will get added to the bridge.

What you're describing sounds like this:

/etc/config/network

#### VLAN configuration
config switch eth0
        option vlan0    "0 1 2 3 4 5*"

#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0


#### LAN configuration
config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    dhcp
        option hostname OpenWRT

/etc/config/wireless

config wifi-device  wl0
        option type     broadcom
        option channel  11
        option diversity 1

config wifi-iface
        option device   wl0
        option network  lan
        option mode     ap
        option ssid     OpenWRT
        option hidden   0
        option encryption psk
        option key ...

(Last edited by exobyte on 20 Jan 2008, 22:49)

Looks about right. But what's the difference here in terms of routing, why suddenly is this configuration not routing traffic like the old one? This change should then be more efficient since it's just a switch right?

But, how do I connect to the device now? If it's a switch, how can I do something like "ssh root@192.168.1.1"?

leidegre wrote:

Looks about right. But what's the difference here in terms of routing, why suddenly is this configuration not routing traffic like the old one? This change should then be more efficient since it's just a switch right?

But, how do I connect to the device now? If it's a switch, how can I do something like "ssh root@192.168.1.1"?

It's not a switch and never was.  The wiki even has a page explaining that.  There's a computer attached to a 6 port switch.

I know you mentioned routing earlier, but there was never any routing going on.  If you meant NAT, it's because the network configuration doesn't have a WAN interface anymore; all 5 visible ports are on the LAN network.

I thought so. Thanks for all the great info, I couldn't find it on the wiki if it was there (as you say it is). Excellent clarification.

Last thing, in the above config, how would I connect to my device? If the NAT stuff no longer occur will the device try to get it's IP of the switch as well? this "option dhcp" for lan, does it mean that it should request it's IP from that interface or that it should serve IPs?

NAT has nothing to do with it.  You can set up an NAT box that gets both LAN and WAN IPs from different DHCP servers.  I've done that, before.

In this case, the computer that controls the switch will get an IP address from a DHCP server on any switch port, or probably even the wireless interface.

http://wiki.openwrt.org/OpenWrtDocs/NetworkInterfaces is a good read.  Once you know how the interfaces are set up, you should know how you need to set up the interfaces.  If you don't, you're probably a little too novice for OpenWRT.

The discussion might have continued from here.