0

I'm kind of new in networks and I have to add static routes to few networks on CentOS. Here are 2 questions that I have:

  1. How to add this: 10.10.x.x/16 is this valid entry and is this mean all IP's on x.x will be valid?

  2. If I'm understand correctly I need to create file with the name of the interface via which will be routing in /etc/sysconfig/network-scripts. Is that correct?

3
  • 2
    1) You want 10.10.0.0/16. 2) The file should be /etc/sysconfig/network-scripts/route-$INTERFACE.
    – jordanm
    Dec 15, 2016 at 6:46
  • So the correct way isn't 10.10.x.x/16 but 10.10.0.0/16?
    – VLS
    Dec 15, 2016 at 6:51
  • @jordanm is correct. 10.10.0.0/16 is the preferred way. That said, you can have any two numbers in the last two places (they will just be ignored).
    – 2ps
    Dec 15, 2016 at 6:56

1 Answer 1

0

As @jordanm said you need to add this in /etc/sysconfig/network-scripts/route-INTERFACENAME

Add following lines

10.10.0.0/16 via IP dev INTERFACENAME

Change IP and INTERFACENAME with yours. After this restart your network

service network restart

More information Configuring Static Routes

0

Not the answer you're looking for? Browse other questions tagged .