On Mon, Oct 05, 1998 at 11:34:15AM +0000, Pere Camps wrote: > I've just installed two ethernet cards on my system and now I have > problems routing some stuff between the two networks. > > eth0 Link encap:Ethernet HWaddr 00:A0:24:52:32:41 > inet addr:147.83.61.17 Bcast:147.83.61.255 Mask:255.255.255.0 > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:4563431 errors:0 dropped:0 overruns:0 frame:0 > TX packets:1473089 errors:0 dropped:0 overruns:0 carrier:50 > Collisions:22947 > Interrupt:10 Base address:0x300 > > eth1 Link encap:Ethernet HWaddr 00:20:18:81:D3:41 > inet addr:147.83.61.17 Bcast:147.83.61.255 Mask:255.255.255.0 > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:446391 errors:0 dropped:0 overruns:0 frame:0 > TX packets:891034 errors:0 dropped:0 overruns:0 carrier:0 > Collisions:0 > Interrupt:12 Base address:0x6500 > > # route > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use Iface > 147.83.61.164 * 255.255.255.255 UH 0 0 7 eth1 > localnet * 255.255.255.0 U 0 0 1294 eth0 > 127.0.0.0 * 255.0.0.0 U 0 0 287 lo > default phc3.upc.es 0.0.0.0 UG 1 0 4847 eth0
It is not the computer that needs an IP address, every single network interface on the computer will need a unique IP address (except if you have point-to-point interfaces, but that doesn't apply in your situation) That means you need to give the eth1 interface a network of it's own. If the computers hanging on the eth1 network shall have internet access as well, with your machine as a gateway you have two possibilities: 1) Let your network administrator assign you a second network, say 147.83.62.0 that is routed through 147.83.61.17 as gateway. Usually this is not possible (considering the normal inflexible administration combined with IP-number shortage) 2) Depending on the number of machines on the second net, say <= 14, choose a corresponding subnet of your own network (147.83.61.0) These must all be free IP adresses. Assign this subnet to eth1 and use proxy arp. Example configuration follows. (yet another: Make eth1 an inofficial (i.e. not routed) network and use IP Masquerading. You will need this if you just have one IP Adress, i.e. the 147.83.61.17 and nothing else. This is more complicated.) Example: Assume Adresses 147.83.61.192-207 are still free (the start IP must be divisible by 16) On the linux box: ifconfig eth1 147.83.61.193 netmask 255.255.255.240 broadcast 147.83.61.207 route add -net 147.83.61.192 dev eth1 arp -s 147.83.61.192 '00:A0:24:52:32:41' netmask 255.255.255.240 pub # Note that this is the hardware address of your first network card, # providing eth0 On the windows box on eth1: IP-Address 147.83.61.194 (or 195,...,206) Netmask 255.255.255.240 Default Gw 147.83.61.193 Nils -- *-----------------------------------------------------------------------------* | Quotes from the net: L> Linus Torvalds, W> Winfried Truemper | | L>this is the special easter release of linux, more mundanely called 1.3.84 | | W>Umh, oh. What do you mean by "special easter release"?. Will it quit | * W>working today and rise on easter? *
pgputqIYM1Osu.pgp
Description: PGP signature