Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Hello Linux experts, I have a linux server with 2 NICs and I am pretty new to this stuff. One card is set to be in Local LAN: ETH0: DEVICE=eth0 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    3

    Linux / Centos with 2 NICs


    Hello Linux experts,

    I have a linux server with 2 NICs and I am pretty new to this stuff.

    One card is set to be in Local LAN:

    ETH0:
    DEVICE=eth0
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=192.168.0.99
    NETMASK=255.255.255.0
    GATEWAY=192.168.0.1

    ETH1:
    DEVICE=eth1
    HWADDR=00:32:44:84:AE:A3
    ONBOOT=yes
    IPADDR=69.19.39.21
    NETMASK=255.255.255.248
    GATEWAY=69.19.35.49

    Looks like from local LAN from any host I have access to 69.19.39.21 but from remote sites that are connected through VPN I don't have access to 192.168.0.99.

    When I shut down ETH1 that is my ISP provider I can access 192.168.0.99 from any remote location.

    What should I do in order to make it work? Take my appologies for such simple question but I am not IT person and do not know that stuff.

    Thank you for any advices or any guides.

    John

  2. #2
    Just Joined! bclark4444's Avatar
    Join Date
    Dec 2003
    Posts
    55
    1) For additional clarification, what is the output of your routing table? The command is 'ip route show'.

    You have GATEWAY defined on both your NIC's and im wondering if this is a routing problem.

    2) you mentioned that your local LAN has access to the 69.19.39.21 NIC, but isnt your local lan a 192.168.0.x address range?

    3) When a remote person VPN's in, do they get a 192.168.0.x IP address?

    4) as a side note, you may also want to place a HWADDR in your eth0 config as well to make sure they mate up to the proper NICs.

    --Brett

  3. #3
    logtech1
    Guest
    Thank you for response. I have to created another user since I am not able to login - don't know why.

    here is my route table:


    [root@centos ~]# ip route show
    69.19.35.48/29 dev eth1 proto kernel scope link src 69.19.39.21
    192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.99
    169.254.0.0/16 dev eth1 scope link
    default via 69.19.35.49 dev eth1

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined! bclark4444's Avatar
    Join Date
    Dec 2003
    Posts
    55
    I suppose your first issue may be that your default router is on a different subnet that either of your NIC's. The router is a 69.19.35.49 whereas your NIC1 is 69.19.39.21 with a subnet of 255.255.255.248.

    Also, What about my original questions 2 & 3? I just want to clarify those if the routing issue doesnt resolve your problem.

    --Brett

  6. #5
    logtech2
    Guest
    2) you mentioned that your local LAN has access to the 69.19.39.21 NIC, but isnt your local lan a 192.168.0.x address range?

    yes it is

    3) When a remote person VPN's in, do they get a 192.168.0.x IP address?

    I mean remote office location. They use another IP like 192.168.3.x etc....

    Meybe I should setup like a bridge using both NICs or add static route?

  7. #6
    Just Joined! bclark4444's Avatar
    Join Date
    Dec 2003
    Posts
    55
    Okay, i think im getting a clearer picture now but i want to confirm. Do you have multiple subnets internally that route through an internal 192.168.0.1 gateway? Or is it a flat internal network with no routing?

    The reason im asking that is because your remote office is on another subnet. Eth0 will only respond to 192.168.0.x addresses while they are on 192.168.3.x which would end up going through the default gateway on eth1. If there is an internal router then we will have to tell it to route 192.168.x.x/16 traffic through eth0 to 192.168.0.1.

    --Brett

  8. #7
    logtech3
    Guest
    "Do you have multiple subnets internally that route through an internal 192.168.0.1 gateway? Or is it a flat internal network with no routing? I don't know exactly that."

    The other 3 remote offices have 192.168.3.x and 192.168.9.x and each office has it own DHCP DNS and Router.

    I quess it is flat internal network with no routing. However; I am able to ping 192.168.0.1 from each remote office.


    IPADDR=192.168.0.99 that is NIC1 in Centos is in LAN that has 182.168.0.1 router (gateway) and there is separate DHCP and DNS servers.

    "The reason im asking that is because your remote office is on another subnet. Eth0 will only respond to 192.168.0.x addresses while they are on 192.168.3.x which would end up going through the default gateway on eth1. If there is an internal router then we will have to tell it to route 192.168.x.x/16 traffic through eth0 to 192.168.0.1." - ok how can I do that? From my limited knowledge to networks I believe this needs to be done on Linux server (static rouute) - right?

    Thank You bclark4444 for your help and I really appreciate this.

    Regards, John


    P.S I am having a problem with this site. Every time I create new user and if I want to login again it tells me that my login/password is incorrect and even reseting password does not help.

  9. #8
    Just Joined! bclark4444's Avatar
    Join Date
    Dec 2003
    Posts
    55
    Are you also using Linux at your remote offices, or are they all windows machines?

    If Windows, then go to the command prompt and type 'ipconfig'. This will show you their IP address and, more importantly, what subnet mask they are using.

    If Linux, then type 'ifconfig' and it will show you that info as well.

    to temporarily add a static route, run the following on the problem Linux server:
    ip route add 192.168.3.0/24 via 192.168.0.1
    ip route add 192.168.9.0/24 via 192.168.0.1

    This will tell it to route all the 192.168.3.x and 192.168.9.x traffic through 192.168.0.1 (assuming that is a router to your remote offices). If this solves the issue then we will want to create/modify the /etc/sysconfig/static-routes file so that they will come up during boot.


    --Brett

  10. #9
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Quote Originally Posted by logtech3 View Post
    P.S I am having a problem with this site. Every time I create new user and if I want to login again it tells me that my login/password is incorrect and even reseting password does not help.
    Hello and welcome, Logtech!

    We've been having some login issues lately and it appears that you've been caught by them as well:

    http://www.linuxforums.org/forum/com...-problems.html

    The matter is being investigated but if you wouldn't mind providing the details of any login issues that you encounter, it might help us to get this solved once and for all. Those details would be best placed in the Comments/Feedback Forum if you don't mind posting there.

    Thanks, and sorry for the inconvenience this has caused.
    oz

  11. #10
    Just Joined!
    Join Date
    Apr 2010
    Posts
    3

    Thumbs up

    Thank You Brett,

    I have added

    ip route add 192.168.3.0/24 via 192.168.0.1
    ip route add 192.168.9.0/24 via 192.168.0.1

    and it start working.

    The only problem is after I reboot system it lost what I added previously. I have CENTOS 5.4 I will try to find what is the proper place and format to keep this stuff
    on the server.

    Thank You so much again for your help Brett !!!!

    John

Page 1 of 2 1 2 LastLast

Posting Permissions

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