Find the answer to your Linux question:
Results 1 to 2 of 2
I have a problem I was trying to solve today, but I ended up getting more confused instead. The situation is that I have two interfaces, gprs0 and gprs1, both ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2010
    Posts
    1

    Configuring with two HW interfaces


    I have a problem I was trying to solve today, but I ended up getting more confused instead.
    The situation is that I have two interfaces, gprs0 and gprs1, both connected to the Internet from the same HW device, but through two different access points
    I just read another blog entry with a guy who had two network cards, using one as a back up - I guess this is a little similar, but should be much easier I am guessing - I am just lost

    Using ifconfig (IP address given by the network) and route to setup the connection,

    ifconfig gprs0 10.20.30.40 up
    route add default dev gprs0
    ping 66.102.7.99 works fine

    afterwards

    ifconfig gprs0 10.20.30.41 up
    route add default dev gprs1
    ping 66.102.7.99 works fine

    So both interfaces work fine, separately
    Of course now there are two default rules in the routing table, of which only the last one is used and works, but the thing is that I actually don't care about the default. I will provide the interface to use for data transfers, but that's what doesn't seem to work for me.

    Removing the routing rules and trying a ping, ping 66.102.7.99 -I gprs0 fails, but the tcpdump gives me this:

    21:18:30.317046 Out ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 10.2.208.46 > 66.102.7.99: ICMP echo request, id 54566, seq 0, length 64
    21:18:32.758971 In ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 48, id 28784, offset 0, flags [none], proto ICMP (1), length 84) 66.102.7.99 > 10.2.208.46: ICMP echo reply, id 54566, seq 0, length 64

    and not surprising ping 66.102.7.99 -I gprs1 gives me this

    21:19:16.082519 Out ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto ICMP (1), length 84) 10.3.195.247 > 66.102.7.99: ICMP echo request, id 55334, seq 0, length 64
    21:19:16.393890 In ethertype IPv4 (0x0800), length 100: (tos 0x0, ttl 48, id 17088, offset 0, flags [none], proto ICMP (1), length 84) 66.102.7.99 > 10.3.195.247: ICMP echo reply, id 55334, seq 0, length 64

    There is data being transmitted and received to device again, I guess the kernel just doesn't know where the incoming data should go without the correct routing tables? Or what exactly is going on?

    The question I have is how do I configure the device to do the correct routing, using only the ifconfig and route commands? Maybe too trivial for you guys, but I am getting tired of goofing around not knowing what is up and down anymore

  2. #2
    Just Joined!
    Join Date
    Oct 2010
    Location
    Reston, VA
    Posts
    26
    I don't know specifically what the issue is but here are a ideas:

    From my experience /sbin/ifconfig can't be trusted. I would use /sbin/ifup and /sbin/ifdown instead.

    If you want to get fancy with routing I would suggest /sbin/ip

    You can setup routing tables in /etc and round robin default gateways with equal weights.

    There my also be options for your module but I haven't actually used it so I don't know.

    Hope this helps a little.

    -Gooney0

Posting Permissions

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