From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 10 Jul 1997 00:17:53 -0500 From: G. David Butler gdb@dbSystems.com Subject: multiple ethernet interfaces, naming Topicbox-Message-UUID: 5cd05af2-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19970710051753.dFfx1issufuIp4iR2BjbFFF-zUg9m7UlyshY8bmrlLE@z> I hate replying to my own messages... Multiple ethernet interfaces are now working. >From: "G. David Butler" >Subject: re: multiple ethernet interfaces, naming > >>From: presotto@plan9.bell-labs.com >>Date: Mon, 7 Jul 1997 10:53:20 -0400 >>Subject: re: multiple ethernet interfaces, naming >> >We? Our source says local is *always* the address of the first >interface. I assume you now use cp->src in iplocalfill()? This was needed. >>Arpd doesn't matter since it is listening to a specific ethernet. >>We actually gave up and moved it into the stack. It made the >>booting checken/egg stuff a lot easier. > >Whoa! That is a faily big change. Isn't there another way to fix >arpd's problems? (See below) I had to take another tact with arpd, but I didn't have to put it in the stack. >>However, I decided that the udp connection oriented stuff was >>too much of a pain for things like bootp and added a 'headers' [snip] >>That way, we can reply from the same address the message was sent to. > >I see that code. I also see the code in ipconfig that adds a secondary >address by pushing internet again. So the headers allow you to >handle secondary addresses correctly, since c->src would be the first >address on an interface. Of course, it would help if arpd worked >correctly. (See below) The secondary code is to handle multiple interfaces, not aliases; even though it could do that. >So far the changes I'm planning look like: > > Change devip.c and make iplocalfill use c->src and deal with the > consequences (i.e. the problems that crop up). Needed. There were no consequences. > Change ipconfig to use "look internet" to see if the interface has > ever been configured instead of looking for a local address on the > ip stack. Boy was that off base! "look internet" doesn't help much on a chan that you are trying to create. Used #P/ipifc instead. > Work on arpd (a lot) to use #P/ipifc data to do the right things. I didn't do this all the way yet. Right now I use the digits at the end of ether* to target the interface and ip number. Works OK if there is only one ip per interface. >Can anyone think of any other problems? How about the big one? The kernel only will pass arp requests to one arpd and an arpd will only sit on one interface. Fixed that. >David Butler >gdb@dbSystems.com dito.