LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-26-2019, 05:27 AM   #1
Fox's Mercantile
LQ Newbie
 
Registered: Jul 2019
Location: Ranger, TX
Distribution: Linux Mint 19.1
Posts: 7

Rep: Reputation: Disabled
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
 
Old 07-27-2019, 06:04 PM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,152
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
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?
 
1 members found this post helpful.
Old 07-27-2019, 06:32 PM   #3
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,750

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
+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.
 
Old 07-27-2019, 10:46 PM   #4
Fox's Mercantile
LQ Newbie
 
Registered: Jul 2019
Location: Ranger, TX
Distribution: Linux Mint 19.1
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by teckk View Post
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.
 
Old 07-28-2019, 08:15 AM   #5
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,152
Blog Entries: 6

Rep: Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835Reputation: 1835
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
 
Old 07-28-2019, 05:58 PM   #6
Fox's Mercantile
LQ Newbie
 
Registered: Jul 2019
Location: Ranger, TX
Distribution: Linux Mint 19.1
Posts: 7

Original Poster
Rep: Reputation: Disabled
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.
 
Old 08-05-2019, 11:27 AM   #7
Fox's Mercantile
LQ Newbie
 
Registered: Jul 2019
Location: Ranger, TX
Distribution: Linux Mint 19.1
Posts: 7

Original Poster
Rep: Reputation: Disabled
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.

Last edited by Fox's Mercantile; 08-05-2019 at 11:37 AM. Reason: Left out something.
 
Old 08-05-2019, 01:28 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
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.
 
Old 08-06-2019, 09:05 AM   #9
Fox's Mercantile
LQ Newbie
 
Registered: Jul 2019
Location: Ranger, TX
Distribution: Linux Mint 19.1
Posts: 7

Original Poster
Rep: Reputation: Disabled
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.
 
Old 08-06-2019, 10:04 AM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
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.
 
Old 08-06-2019, 10:11 AM   #11
Fox's Mercantile
LQ Newbie
 
Registered: Jul 2019
Location: Ranger, TX
Distribution: Linux Mint 19.1
Posts: 7

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
AT&T U-verse LAN on eth0 subnet on eth1 Fox's Mercantile Linux - Networking 2 07-27-2019 06:38 PM
U-Verse "requires" separated LAN for TV vs. data SaintDanBert Linux - Networking 29 10-14-2014 01:18 PM
broadcom wireless verse opensuse repositories monnow SUSE / openSUSE 3 06-23-2010 02:48 PM
libc.so verse libc.so.5 markstevens Linux - Software 4 06-19-2003 11:41 AM
apachectl verse httpd onlinesnet Linux - Newbie 5 09-19-2001 07:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration