LinuxQuestions.org
Review your favorite Linux distribution.
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 10-31-2015, 07:14 PM   #1
gctaylor1
Member
 
Registered: Dec 2006
Distribution: Red Hat
Posts: 45

Rep: Reputation: 0
RHEL/CentOS - Correct persistent ip route on my subnets?


In order for ping to work between my hosts with the 198.47.230.xxx addresses and routing table:
Code:
DEVICE=eth0.730
BOOTPROTO=none
IPADDR=198.47.230.177
ONBOOT=YES
TYPE=Ethernet
VLAN=yes
NETMASK=255.255.255.240
Code:
# ip addr show dev eth0.730
15: eth0.730@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 00:0c:29:56:d3:d8 brd ff:ff:ff:ff:ff:ff
    inet 198.47.230.177/28 brd 198.47.230.191 scope global eth0.730
    inet6 fe80::20c:29ff:fe56:d3d8/64 scope link
       valid_lft forever preferred_lft forever
Code:
# ip route
198.47.230.176/28 dev eth0.730  proto kernel  scope link  src 198.47.230.177
192.168.35.0/24 dev eth1  proto kernel  scope link  src 192.168.35.61
169.254.0.0/16 dev eth0  scope link  metric 1002
169.254.0.0/16 dev eth1  scope link  metric 1003
169.254.0.0/16 dev eth0.3073  scope link  metric 1013
169.254.0.0/16 dev eth0.3074  scope link  metric 1014
169.254.0.0/16 dev eth0.730  scope link  metric 1015
10.0.0.0/8 dev eth0.3073  proto kernel  scope link  src 10.254.33.129
10.0.0.0/8 dev eth0.3074  proto kernel  scope link  src 10.254.1.129
default via 192.168.35.2 dev eth1
I have to
Code:
#ip route del 198.47.230.176/28 dev eth0.730
#ip route add 198.47.230.176 dev eth0.730
or
Code:
# cat /etc/sysconfig/network-scripts/ifcfg-eth0.730
DEVICE=eth0.730
BOOTPROTO=none
IPADDR=198.47.230.177
ONBOOT=YES
TYPE=Ethernet
VLAN=yes
NETMASK=255.255.255.255  #This seems wrong.
How do I make this persistent between reboots with a correct configuration?

I've tried a few things in my ifcfg-eth0.730 file as well as route-eth0.730 but have not been able to get it right. What am I doing wrong? Seems like there is some aspect of subnetting that I am not understanding.

These hosts are guests on VMware WS 11.0 and I have a host only subnet configured:
Click image for larger version

Name:	VMwareNet.PNG
Views:	42
Size:	19.2 KB
ID:	19921
and I am trying to get this VLAN working.

The 192.168.35.xx addresses work.
The 10.0.0.0 are not configured yet. They're next.

Thanks for any enlightenment,
Gary
 
Old 11-02-2015, 09:20 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
The /28 is CIDR notation and is equivalent of netmask 255.255.255.240. It allows only the range of IPs 198.47.230.176 - 198.47.230.191

The netmask 255.255.255.255 you show later is equivalent to /32. It allows only a single IP because its range is 198.47.230.176 - 198.47.230.176.

You don't say what IP you're trying to reach this server from.

You probably need to modify your /etc/sysconfig/network-scripts/ifcfg-eth0.730 line for netmask to change it from 255.255.255.255 to a netmask that includes the IP of this server and the system(s) you're trying to reach it from (assuming same subnet - otherwise you can add to the route.eth0.730 for other subnets).

This link lets you input information and will give you the CIDR notation for any netmask you input or vice versa:
http://www.subnet-calculator.com/cidr.php
 
1 members found this post helpful.
Old 11-07-2015, 10:40 PM   #3
gctaylor1
Member
 
Registered: Dec 2006
Distribution: Red Hat
Posts: 45

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by MensaWater View Post
The /28 is CIDR notation and is equivalent of netmask 255.255.255.240. It allows only the range of IPs 198.47.230.176 - 198.47.230.191

This link lets you input information and will give you the CIDR notation for any netmask you input or vice versa:
http://www.subnet-calculator.com/cidr.php
Thanks much Mensa, that link is a good resource.

Gary
 
  


Reply

Tags
route, subnet, vlan


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
CentOS 6 - Persistent Static Route karim.wallani Linux - Newbie 4 05-24-2013 08:52 AM
CentOS 6 - Persistent Static Route karim.wallani Linux - Networking 5 06-29-2012 04:42 PM
How to route only specific traffic between 2 subnets fender4645 Linux - Networking 3 06-17-2012 06:25 AM
persistent static route ANU Linux - Networking 5 04-01-2012 07:23 PM
[SOLVED] howto to route 2 subnets between 2 routes sys7em Linux - Networking 1 10-28-2010 02:39 PM

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

All times are GMT -5. The time now is 11:05 AM.

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