Find the answer to your Linux question:
Results 1 to 5 of 5
I've been searching everywhere on the web for this. I have dual nic's, I want to assign multiple static ips on each network I already have it configured so that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2012
    Posts
    3

    Dual Wan's CentOS "Adding More IPS"


    I've been searching everywhere on the web for this.
    I have dual nic's, I want to assign multiple static ips on each network
    I already have it configured so that ISP 1
    is eth0, eth0:0, and eth0:1 the network config is a block of statics
    and I am using say 75.160.x.x, 75.160.x.y and 75.160.x.z it has a subnet mask of 255.255.255.248

    isp 2 I have configured this nic as eth1, eth1:0 and eth1:1, I have also enabled tcp ip v4 ip forwarding in my sysctl file. and its subnetmask is 255.255.255.240
    ips are 75.161.x.x, 75.161.x.y and 75.161.x.z
    Also both networks have separate gateways and should use the separate gateways.

    However whenever I enable eth1 both nic's no longer work eth0 dies and cannot be pinged from the internet. neither can eth1
    So the question is how can I get both nic’s working and allowing both ips to function with the isps.
    I am trying to move my mail accounts and a few virtual website to the new isp so I need each nic and ips to work there respected isps
    also each network has its own router and gateway.
    Last edited by niceguy167; 07-23-2012 at 02:33 AM. Reason: adding spelling corrections

  2. #2
    Linux Newbie
    Join Date
    Jan 2012
    Location
    Ohio
    Posts
    175
    Can you post the following:

    ifconfig -a
    route
    cat /etc/sysconfig/static-routes

  3. #3
    Just Joined!
    Join Date
    Jul 2012
    Posts
    3
    Sorry for a big wait on the info but I have been out of town. Here you are
    Thanks again for your help
    Steven

    Ifconfig Looks Like This
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:50:BA:B9:78:4F  
              inet addr:71.152.59.169  Bcast:71.152.59.175  Mask:255.255.255.248
              inet6 addr: fe80::250:baff:feb9:784f/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:3061719 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2428949 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:706723615 (673.9 MiB)  TX bytes:977475547 (932.1 MiB)
              Interrupt:185 Base address:0x6000 
    
    eth0:0    Link encap:Ethernet  HWaddr 00:50:BA:B9:78:4F  
              inet addr:71.152.59.170  Bcast:71.152.59.175  Mask:255.255.255.248
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:185 Base address:0x6000 
    
    eth0:1    Link encap:Ethernet  HWaddr 00:50:BA:B9:78:4F  
              inet addr:71.152.59.171  Bcast:71.152.59.175  Mask:255.255.255.248
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:185 Base address:0x6000 
    
    eth0:2    Link encap:Ethernet  HWaddr 00:50:BA:B9:78:4F  
              inet addr:71.152.59.172  Bcast:71.152.59.175  Mask:255.255.255.248
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:185 Base address:0x6000 
    
    eth1      Link encap:Ethernet  HWaddr 00:04:5A:7C:3F:CB  
              inet addr:75.162.50.17  Bcast:75.162.50.31  Mask:255.255.255.240
              inet6 addr: fd00::204:5aff:fe7c:3fcb/64 Scope:Global
              inet6 addr: fe80::204:5aff:fe7c:3fcb/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:586 errors:0 dropped:0 overruns:0 frame:0
              TX packets:127 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:38832 (37.9 KiB)  TX bytes:7992 (7.8 KiB)
              Interrupt:201 Base address:0x8000 
    
    eth1:0    Link encap:Ethernet  HWaddr 00:04:5A:7C:3F:CB  
              inet addr:75.162.50.18  Bcast:75.162.50.31  Mask:255.255.255.240
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:201 Base address:0x8000 
    
    eth1:1    Link encap:Ethernet  HWaddr 00:04:5A:7C:3F:CB  
              inet addr:75.162.50.19  Bcast:75.162.50.31  Mask:255.255.255.240
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:201 Base address:0x8000 
    
    eth1:2    Link encap:Ethernet  HWaddr 00:04:5A:7C:3F:CB  
              inet addr:75.162.50.20  Bcast:75.162.50.31  Mask:255.255.255.240
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:201 Base address:0x8000 
    
    eth1:3    Link encap:Ethernet  HWaddr 00:04:5A:7C:3F:CB  
              inet addr:75.162.50.21  Bcast:75.162.50.31  Mask:255.255.255.240
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:201 Base address:0x8000 
    
    eth1:4    Link encap:Ethernet  HWaddr 00:04:5A:7C:3F:CB  
              inet addr:75.162.50.22  Bcast:75.162.50.31  Mask:255.255.255.240
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:201 Base address:0x8000 
    
    eth1:5    Link encap:Ethernet  HWaddr 00:04:5A:7C:3F:CB  
              inet addr:75.162.50.23  Bcast:75.162.50.31  Mask:255.255.255.240
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              Interrupt:201 Base address:0x8000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:600003 errors:0 dropped:0 overruns:0 frame:0
              TX packets:600003 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:361193178 (344.4 MiB)  TX bytes:361193178 (344.4 MiB)
    
    sit0      Link encap:IPv6-in-IPv4  
              NOARP  MTU:1480  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
    Route is
    Code:
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    71.152.59.168   *               255.255.255.248 U     0      0        0 eth0
    75.162.50.16    *               255.255.255.240 U     0      0        0 eth1
    169.254.0.0     *               255.255.0.0     U     0      0        0 eth1
    default         75.162.50.30    0.0.0.0         UG    0      0        0 eth1
    There do not appear to be any static routes setup at this time
    as both static-routes does not exist and /etc/sysconfig/network-scripts/ no route-interface or anything like that exists
    This is Centos thanks again.
    Steven

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Jan 2012
    Location
    Ohio
    Posts
    175
    When you say "eth0 dies" do you mean it goes down, or you just can't ping it from outside. Can you send pings from it? Your routing table shows your default gateway is only on the second ISP. I would put in some static routes to tell the server where to send traffic coming from each subnet.

  6. #5
    Just Joined!
    Join Date
    Jul 2012
    Posts
    3
    Quote Originally Posted by ktech11 View Post
    When you say "eth0 dies" do you mean it goes down, or you just can't ping it from outside. Can you send pings from it? Your routing table shows your default gateway is only on the second ISP. I would put in some static routes to tell the server where to send traffic coming from each subnet.
    I cannot ping it form outside the network and both eth1 and eth0 are offline at that point.
    What is the settings to add the static routes for each adapter?
    Thanks
    Steven

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •