dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
574
share rss forum feed


DprssdIsntFn
Premium
join:2004-01-12
Lakeland, FL

1 edit

Need comfirmation regarding how IP assignment works [SOLVED]

I need to test both multiple virtual and physical LANs on my network. This is research for a potential project I've been asked to get involved in.

To that end, I re-purposed an older PC as a new Gentoo {from scratch source code build} GNU/Linux router to replace my current Linksys WRT54G.

I've configured the new router with 4 NICs. This is a snippet of the 'rc' configuration:[code]
# PC is re-purposed to be a router/DHCP/DNS router/fowarder as well as to provide
# local PORTAGE rsync services.
#
# NIC 0 = external WAN {cable modem} connection - uses DHCPD
# NIC 1 = internal LAN connection
# NIC 2 = internal LAN connection
# NIC 3 = WAP {Wireles Access Point} connection

# Expected working set up.

# config_eth0="dhcp"
# config_eth1="192.168.11.1 broadcast 192.168.0.255 netmask 255.255.255.0"
# config_eth2="192.168.11.2 broadcast 192.168.0.255 netmask 255.255.255.0"
# config_eth3="192.168.31.1 broadcast 192.168.0.255 netmask 255.255.255.0"
[/code]
The above is a snippet of the new router's NIC configuration. Naturally, the last four lines would be uncommented in actual use.

When I test this configuration, I don't get the results I expect for eth0. This is the connection to my Arris vable modem.

I know and understand that BHN normally assigns the same IP address. I had assumed that this was tied to the cable modem. However, when I try my new router, I get a completely different IP address {starting with 169 rather than 68}.

This implies that the originally assigned IP address is tied to the MAC address of the device hooked to the cable modem.

I have no problem with this as my new router then uses this new IP address for eth0.

The problem is that BHN then _does NOT_ provide any gateway or DNS information to go with the new IP address.

The old router receives this information through DHCP built in it's firmware. Further, my re-purposed PC has no problem using DHCP to retrieve this information from my Linksys router when I connect it as a normal PC on my network. This implies I have DHCP correctly configured on my new router.

I have a number of different things I can try but I'd rather work from an informed basis instead of shooting blind in the dark.

What am I missing here?

For my DHCP client, I'm currently using:[code]
net-misc/dhcpcd
Available versions: 5.2.12 (~)5.5.3 (~)5.5.4 (~)5.5.5 (~)5.5.6 (~)5.6.2 {{+zeroconf ELIBC="glibc"}}
Installed versions: 5.6.2(10:58:42 PM 10/14/2012)(zeroconf ELIBC="glibc")
Homepage: »roy.marples.name/projects/dhcpcd/
Description: A fully featured, yet light weight RFC2131 compliant DHCP client
[/code]
This is pretty much THE standard DHCP client in use in the 'Nix world. The version I have installed is {as noted above} 5.6.2. All of my Linux based PCs are using this version of DHCP to get their local LAN IP address assignment.

If I need to, I can certainly spoof the MAC address. But I'd rather just properly get the Gateway and DNS addresses in a normal fashion.


tlg
Premium
join:2001-08-23
Melbourne, FL

Re: Need comfirmation regarding how IP assignment works

Is the Aris in gateway (routing) mode or bridged?
--
twitter.com/tgaume


tlg
Premium
join:2001-08-23
Melbourne, FL
reply to DprssdIsntFn
Also, you can't have eth1 & eth2 in the same subnet. If they are the WAN connection & one for the internal LAN they must be on different subnets or will never route traffic.
--
twitter.com/tgaume


tlg
Premium
join:2001-08-23
Melbourne, FL
reply to DprssdIsntFn
What IP subnet is being assigned to eth0 (1st 3 octets). When a DHCP server fails, APIPA allocates IP addresses in the private range 169.254.0.1 to 169.254.255.254.
--
twitter.com/tgaume


tlg
Premium
join:2001-08-23
Melbourne, FL
reply to DprssdIsntFn
Also, anytime you plug a new device into a bridged router / modem you must power reset the router / modem in order for it to bind to the new MAC address.
--
twitter.com/tgaume


DprssdIsntFn
Premium
join:2004-01-12
Lakeland, FL
said by tlg:

Also, anytime you plug a new device into a bridged router / modem you must power reset the router / modem in order for it to bind to the new MAC address.

Just figured out this was the problem. Thank you


DprssdIsntFn
Premium
join:2004-01-12
Lakeland, FL
reply to tlg
said by tlg:

Also, you can't have eth1 & eth2 in the same subnet. If they are the WAN connection & one for the internal LAN they must be on different subnets or will never route traffic.

For the benefit on anyone else reading this.

The situation I've set up is:

eth0 - WAN
eth1 - LAN connection to 8 port ethernet switch
eth2 - LAN connection to 2nd 8 port ethernet switch.
eth3 - LAN connection to WAP {Wireless Access Point}.

This configuration is for some testing we're doing regarding multiple virtual boxes with multiple virtual networks across multiple physical segments, do not use my configuration as a guide.

My LAN NICs will be set in promiscuous mode and will also each be configured with multiple addresses. In other words, we're deliberately testing network saturation and misconfiguration. You really don't want to follow my example.

If you intend to set up multiple physical segments be sure your segment addressing reflect this.

The 'normal' configuration would be to set eth1 and eth2 on different subnet segments. i.e. eth1 to 192.168.11.1 and eth2 to 192.168.21.1.


tlg
Premium
join:2001-08-23
Melbourne, FL
That makes it much clearer.

I was reading your initial post on my phone (thus the many short responses) and thought you were trying to build a router for 2 LAN's and a separate LAN for the WAP.
--
twitter.com/tgaume