LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   AT&T U-verse LAN on enp4s0 subnet on enp6s0 (https://www.linuxquestions.org/questions/linux-networking-3/at-and-t-u-verse-lan-on-enp4s0-subnet-on-enp6s0-4175658065/)

Fox's Mercantile 07-26-2019 05:27 AM

AT&T U-verse LAN on enp4s0 subnet on enp6s0
 
Using DHCP From the AT&T modem (192.168.1.254) for enp4s0 (192.168.1.175) gives me full access to the Internet. Quite as one would expect.

Then I used the static command to provide a fixed address. (192.168.1.250)

I added a second network card, enp6s0 and statically assigned 192.168.10.1 to it.
I'm running the DHCP server and it's supposed to on enp6s0. (It says it is.)
Range 192.168.10.100 to 192.168.10.199

I use an older MacBook to test connectivity. Because it's so simple. Click settings -> network.

I have a cheap 5-port switch on enp6s0 for connectivity.

The MacBook doesn't get any DHCP information from enp6s0.
If I assign a manual IP address (192.168.10.10) I can't ping enp6s0, nor can the Linux box ping the MacBook.

I'm pretty sure this has something to do with I have NO idea what I'm doing with routing.

/etc/network/interfaces

auto lo
iface lo inet loopback

# enp4s0, connected to 192.168.1.x house/shop LAN
auto enp4s0
iface enp4s0 inet static
address 192.168.1.250
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254

# enp6s0, connected to 192.168.10.x linux LAN
auto enp4s0
iface enp4s0 inet static
address 192.168.10.1
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
gateway 192.168.10.1

# Add route to interfaces
post-up ip route add 192.168.1.0/24 dev enp4s0 src 192.168.1.250 table rt2
post-up ip route add default via 192.168.1.254 dev enp4s0 table rt2
post-up ip rule add from 192.168.1.250/32 table rt2
post-up ip rule add to 192.168.1.250/32 table rt2

# end of interfaces

And

/etc/iproute2/rt_tables

#
# reserved values
#
255 local
254 main
255 default
0 unspec
#
# local
#
#1 inr.ruhep
1 rt2
ip route add 192.168.1.0/24 dev enp4s0 src 192.168.1.250 table rt2
ip route add default via 192.168.1.254 dev enp4s0 table rt2
#
#
# routing rules
ip rule add from 192.168.1.250/32 table rt2
ip rule add to 192.168.1.250/32 table rt2

# end of rt_tables




/etc/iproute2/rt_tables

teckk 07-27-2019 06:04 PM

1. 192.168.1.175
2. 192.168.10.1

Those are on different subnets. So it depends on what the machines masks are.

I can't tell what you have but...

Code:

iface enp4s0 inet static
address 192.168.1.250
netmask 255.255.255.0

iface enp4s0 inet static
address 192.168.10.1
netmask 255.255.255.0

Those can't reach each other. Can you see why? You'll need 255.255.0.0

https://en.wikipedia.org/wiki/Cidr

How many machines do you have to serve? It'll be easier if you get a little order.
Why don't you make that home portal 192.168.0.1
Then the first machine 192.168.0.2 and so on.
Then make the DHCP range 192.168.0.10-192.168.0.20

Is there a reason for different subnets?

scasey 07-27-2019 06:32 PM

+1 to teckk’s “Why two subsets?” question...
My home network supports 14 devices. Two are wired connections and one of those has a static IP. The other 12 are wireless on 2.4 and 5Ghz and include a laptop, a couple of iPads, a couple of iPhones, a Ring doorbell, an all-in-one printer (also static), a chromecast, an Apple TV and some I’m not recalling what they are.

They are all in the same subnet, and all can ping each other. Setup for each was just a matter of powering them up. Each can see and use the internet.

So please explain what you’re trying to accomplish with the second subnet.

Fox's Mercantile 07-27-2019 10:46 PM

Quote:

Originally Posted by teckk (Post 6019123)
1. 192.168.1.175
2. 192.168.10.1

Those are on different subnets. So it depends on what the machines masks are.

I can't tell what you have but...

Code:

iface enp4s0 inet static
address 192.168.1.250
netmask 255.255.255.0

iface enp4s0 inet static
address 192.168.10.1
netmask 255.255.255.0

Those can't reach each other. Can you see why? You'll need 255.255.0.0

https://en.wikipedia.org/wiki/Cidr

How many machines do you have to serve? It'll be easier if you get a little order.
Why don't you make that home portal 192.168.0.1
Then the first machine 192.168.0.2 and so on.
Then make the DHCP range 192.168.0.10-192.168.0.20

Is there a reason for different subnets?

Re: 255.255.0.0, did I mention I have NO idea what I'm doing? So thank you.
Also, you're referring to both netmasks in the /etc/network/interfaces file?

Re: simplifying, I already have about 40 devices on the 192.168.1.x LAN.
About half of them are static, the rest are DHCP. I really don't want to have to change everything.

Re: different subnets:
I programming Cisco phones, notably, the 7940 and 7960 phones.
For reasons unknown to anyone other than the Cisco spooks that write the firmware,
sometimes you can't set the tftp server and it defaults to the DHCP server.
The DHCP is the AT&T U-verse modem is 192.168.1.254, it most certainly does NOT have tfpt services.
So the Cisco bangs away indefinitely waiting for it to respond.
Hence, a second subnet, with a DHCP server. The Cisco should default to the DHCP server (the Linux box) and find the tftp server.

Now I have an odd problem.
1. DHCP doesn't send any information to someone on the enp6s0 subnet, despite being configured to use enp6s0.
I suspect this is a routing issue.

Thankies.

teckk 07-28-2019 08:15 AM

Quote:

DHCP doesn't send any information to someone on the enp6s0 subnet, despite being configured to use enp6s0.
I don't know what that means.

What is the DHCP server? The ATT device? Arris BGW 210-700 or Pace 5268.

Configure the DHCPv4 Netmask on the DHCP server so that it can reach your subnets.
A DHCP client should accept an IP that DHCP server passes out. Unless that client only accepts a certain range.

Configure your clients to receive an IP from the DHCP server. Look at the Mint docs to configure your ethernet interface.

If it's a BGW 210-700 device, look at:
http://192.168.1.254/cgi-bin/dhcpserver.ha

If it's the Pace modem then, look at it's web interface. I don't have one of those handy.

For example:
Device IPv4 Address 192.168.0.1
Subnet Mask 255.255.255.224

That will reach 192.168.0.1 to 192.168.0.30, that's it.
Quote:

did I mention I have NO idea what I'm doing?
Ok, here are some links
https://opensource.com/business/16/8...etwork-routing
http://www.linuxhomenetworking.com/w...nux_Networking
https://linuxsecurity.com/resource_f...-tutorial.html
https://en.wikibooks.org/wiki/Linux_Networking
https://www.maketecheasier.com/setti...th-linux-mint/

https://www.youtube.com/watch?v=WM8dbF3gYgQ
https://community.cisco.com/t5/ip-te...0/td-p/1704013

Fox's Mercantile 07-28-2019 05:58 PM

The AT&T U-verse modem, 192.168.1.254 handles the DHCP requests on the 192.168.1.x LAN.
It is an ARRIS NVG599

For example, if I have in the /etc/network/interfaces file: (On the Linux box)
auto enp4s0
allow-hotplug enp4s0
iface enp4s0 inet dhcp

The AT&T modem assigns 192.168.1.175 to the Linux box and everything works as one would expect.
Full connectivity to the internet, and everyone else on the 192.168.1.x LAN can connect to the Linux Box.

Now while I appreciate all the "Read this, this and this."

What I'm asking for is both the /etc/network/interfaces and /etc/iproute2/rt_tables files
filled out "Copy this to your Linux box, it will work."

enp4s0 should be 192.168.1.10 (static) and be able to connect to 192.168.1.x and 192.168.10.x
along with connecting to the internet via the AT&T modem.
And enp6s0 should be 192.168.10.1 (static) and be able to connect to 192.168.10.x and 192.168.1.x
Being able to connect to the internet via the AT&T modem would be nice.
Once that is accomplished, then I can play with the DHCP server (for 192.168.10.x) on the Linux box.

Fox's Mercantile 08-05-2019 11:27 AM

Gee willikers Wally, over a week and not a peep.
Either nobody knows how to do this, or I've fallen into the "We're not going to do your work for you" trap.

So, to keep my self occupied during the deafening silence, I've tried some alternatives.
1. Ubuntu Server. Except it wouldn't recognize any of the network cards.
2. Caldera 2.3. Except it wouldn't recognize the SATA hard drives.
3. ClearOS 7. Select "gateway" during install. Works perfectly and the (automatic) routing and DHCP does what I wanted.

Thank you for your help.

michaelk 08-05-2019 01:28 PM

What distribution/version are you currently running?

Code:

# enp6s0, connected to 192.168.10.x linux LAN
auto enp4s0
iface enp4s0 inet static
address 192.168.10.1
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
gateway 192.168.10.1

From your original post it looks like you first copied/pasted the configuration from enp4s0 but did not change enp4s0 to enp6s0. Did you ever catch that error?

enp6s0 does not have a gateway and none should be defined.

Without enabling ip_forward traffic from enp6s0 will not be forwarded to enp4s0.

Quote:

Full connectivity to the internet, and everyone else on the 192.168.1.x LAN can connect to the Linux Box.
If setting enp4s0 to a static IP address keeps everyone on the LAN from connecting then you have an IP address conflict. If enp4s0 is configured with a static IP address you have to manually setup resolv.conf (depends on distribution/version) to be able to resolve URLs.
This is why DHCP works.

Look at the log files for your DHCP server. There is probably an error somewhere which prevents it from starting.

Fox's Mercantile 08-06-2019 09:05 AM

Typos not withstanding...
I corrected the interfaces file.

I run an IP scanner on the LAN to see who's who and which IP numbers are in use.

Currently, the 500 Gb SATA drive with Linux Mint 19.1 is currently resting happily by itself on a shelf.
I swapped drives with a second 500 Gb drive and installed ClearOS 7 instead.

Selected "gateway" during the install and everything works like it's supposed to.
The 1st NIC sees the AT&T LAN as the WAN, and the 2nd NIC assumes it is the LAN with a different subnet.
The local DHCP server (on the ClearOS box) handles DHCP requests on the 2nd NIC like it should.

michaelk 08-06-2019 10:04 AM

Quote:

I run an IP scanner on the LAN to see who's who and which IP numbers are in use.
It depends on what DHCP server version the router runs. Typically a random address (192.168.1.XXX) within the defined range is assigned but a device will tend to always be assigned the same if possible. If you can access the routers DHCP setup page you should be able to see the defined DHCP range and assign a static address outside. Most router's have the capability to assign an address reservation and therefore any device can basically have a static address while using DHCP.

Fox's Mercantile 08-06-2019 10:11 AM

ClearOS 7 works like it should.

The DHCP server assigns IP address in the range of 192.168.2.100-199 as I set it up to do.
And only to the 2nd network card like it's supposed to.


All times are GMT -5. The time now is 06:56 PM.