Results 1 to 9 of 9

Thread: Gateway configuration question...

  1. #1
    eduardo_at_ises NNTP User

    Unhappy Gateway configuration question...

    Hi all,

    I am OpenSuse 11.1 with the traditional ifup method to solve my networking requirements on my Toshiba laptop. The only problem that I have right now is that I need to keep changing by hand my default gateway and DNS settings every time because of the different configurations that I have at home and in the office.

    At home I use 192.168.1.254/24 (this is my router) as my gateway with Dynamic IP handling and normally I use WLAN for my connections. I don't need to specify any DNS configuration to get internet with this configuration.

    In the office, I am using ETH0 with static IP. The gateway is 10.0.47.2 and the DNS configuration is 135.196.0.6 and 135.196.014.

    The question: Is there a way to get these two configurations working without having to manually change it with Yast all the time? I know very little about routing tables and those things. What I know have been learn the hard way, so please keep it as down to earth as possible.

    Thanks in advance for your help.

  2. #2
    Join Date
    Oct 2008
    Location
    North Wales, UK
    Posts
    1,114

    Default Re: Gateway configuration question...

    If you have a dhcp server, rather set the network to use it. Most dhcp servers are set up to pass the gateway and dns server addresses to the client. Unless there is a reason for a fixed ip address, its easier to use.

  3. #3
    Join Date
    Oct 2008
    Location
    Stuttgart - Germany
    Posts
    163

    Default Re: Gateway configuration question...

    You also may use knetworkmanager.

  4. #4
    eduardo_at_ises NNTP User

    Default Re: Gateway configuration question...

    Hi Guys,

    Thanks for your replys. Unfortunately, I have not control over the office network. The IT guys here are using VLAN and all sort of things to make my life miscerable (This is a block of offices and they manage the whole building). I manage to get the VLAN running after week of playing around. NetworkManager didn't like VLANs and it is not an option because it will switch eth0 off/down when it detects that the cable is unplug (I have a license manager that runs using eth0's ID to check that it is the softawared licensed machine). Any file that I could hack... ideas are welcome... yes I'm getting desparate!!

  5. #5
    Camalen NNTP User

    Default Re: Gateway configuration question...

    eduardo at ises wrote:

    > Thanks for your replys. Unfortunately, I have not control over the
    > office network. The IT guys here are using VLAN and all sort of things
    > to make my life miscerable (This is a block of offices and they manage
    > the whole building). I manage to get the VLAN running after week of
    > playing around. NetworkManager didn't like VLANs and it is not an option
    > because it will switch eth0 off/down when it detects that the cable is
    > unplug (I have a license manager that runs using eth0's ID to check that
    > it is the softawared licensed machine). Any file that I could hack...
    > ideas are welcome... yes I'm getting desparate!!


    You can investigate the use of 2 network profiles: one to launch a static
    setup and another to load dynamic configuration using dhcp.

    Then, you can disable the network interface at startup so you will have to
    manually initiate the script (running "ifup" or "rcnetwork...") with the
    desired profile, depending on your location and needs.

    THT.

    Greetings,

    --
    Camalen

  6. #6
    eduardo_at_ises NNTP User

    Default Re: Gateway configuration question...

    so can I assume that it is not possible to assign two different gateways i.e. one for eth0 and another for wlan0?


  7. #7
    Camalen NNTP User

    Default Re: Gateway configuration question...

    eduardo at ises wrote:

    > so can I assume that it is not possible to assign two different gateways
    > i.e. one for eth0 and another for wlan0?


    Yes, you can.

    In the form of "route add default gw ip-address interface-name"

    See "man route".

    But I don't see the problem here :-?

    - When using wifi, dhcp servers gives you all the required data (ip/netmask,
    dns and gateway).

    - When using ethernet, it defaults to "/etc/sysconfig/network/icfg-eth0"
    and "/etc/sysconfig/network/routes" to get ip/netmask and gateway data
    and /etc/resolv.conf for getting dns server information.

    Greetings,

    --
    Camalen

  8. #8
    eduardo_at_ises NNTP User

    Default Re: Gateway configuration question...

    Hi Camaleon,

    Sorry that I didn't answer back earlier. I had to put the laptop aside while dealing with other work related things.

    Anyway, you are right and to be honest that was my understanding as well wrt. DHCP and the handling of IP/GATEWAY/MASK/DNS etc.

    I reinstalled everything and this time I decided to use KDE instead of Gnome.

    I noticed that it seems to work as expected with KDE. However the only problem was that the Internet response was very slow (slow as in finding the page and not regarding download time). The only way I managed to make it work at a descent rate was by adding my router's IP address to the list of DNS servers as SERVER1. The thing is that when I am in the office I need to change the DNS SERVER1to the one used in the office, otherwise the Internet will be slow again. Could this be ralated to the fact that we are using a VLAN configuration in the office? Do you have any suggestion(s)?

    Regards
    Ed.

  9. #9
    Camalen NNTP User

    Default Re: Gateway configuration question...

    eduardo at ises wrote:

    > I noticed that it seems to work as expected with KDE. However the only
    > problem was that the Internet response was very slow (slow as in finding
    > the page and not regarding download time). The only way I managed to
    > make it work at a descent rate was by adding my router's IP address to
    > the list of DNS servers as SERVER1.


    You mean by using wifi or ethernet cable?

    Wifi is slower than ethernet as card drivers, security (wpa) and AP coverage
    can be really make things do not run as flawlessly as they should.

    If using ethernet, that's another thing. You should not have problems with
    domain resolution, so the only cause of that slowness can be your ISP dns
    machines are just, well, bad or a bit slow. Try with another dns servers,
    such "opendns" ones.

    Also, disabling ipv6 in firefox may help.

    > The thing is that when I am in the
    > office I need to change the DNS SERVER1to the one used in the office,
    > otherwise the Internet will be slow again.


    While using a DHCP setup you should not need to modify anything at any level
    (nor ip/netmask, dns servers, gateway) so your /etc/resolv.conf should not
    be manually modified.

    > Could this be ralated to the
    > fact that we are using a VLAN configuration in the office? Do you have
    > any suggestion(s)?


    I don't know your specific network setup, but the use of VLAN "per se"
    should not affect at all. Wifi can make resolution going slowly.

    Greetings,

    --
    Camalen

Tags for this Thread

Posting Permissions

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