Results 1 to 4 of 4

Thread: ifconfig

  1. #1

    ifconfig

    At this link here there is a explanation of the shapecfg command. I have finally got everything to work except for the following:


    Then you need to configure the shaper0 interface for networking, using the usual sort of ifconfig and route commands.

    ifconfig shaper0 host netmask mask broadcast bcast up
    route add -net net netmask mask dev shaper0
    &


    route delete default eth0
    route add default gw gateway shaper0

    In the above two quotes, the words in italics are to be substituted with the existing values for the ethX card that I want to apply the shapecfg command to. (in my case it it eth2). How do I found out what those values are for ethX on my current working (& un'shaped') system? Yes I looked at the man pages for ifconfig & it was just as cryptic & unhelpful (read I had more questions after I looked at it) as every other man page I have seen. TIA

  2. #2
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:ifconfig

    [aschott@system11 aschott]$ ifconfig -a
    eth0 Link encap:Ethernet HWaddr 00:00:B4:5F:98:1A
    inet addr:666.666.666.666 Bcast:206.190.6.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:4043114 errors:0 dropped:0 overruns:0 frame:2
    TX packets:2395314 errors:0 dropped:0 overruns:0 carrier:0
    collisions:3042 txqueuelen:100
    RX bytes:4206590779 (4011.7 Mb) TX bytes:235102112 (224.2 Mb)
    Interrupt:11 Base address:0xe400

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:2911 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2911 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:136007 (132.8 Kb) TX bytes:136007 (132.8 Kb)

    vmnet1 Link encap:Ethernet HWaddr 00:50:56:C0:00:01
    inet addr:172.16.241.1 Bcast:172.16.241.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2880 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

    vmnet8 Link encap:Ethernet HWaddr 00:50:56:C0:00:08
    inet addr:192.168.161.1 Bcast:192.168.161.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1441 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

    [aschott@system11 aschott]$
    As you can see, it shows all network interfaces here.

    Is this what you want?

  3. #3

    Re:ifconfig

    i think that is it, however I still got some kind of problem
    also I'm using redhat 7.3 kernel 2.4.18-10


    Ok. I used ifconfig & i put in the following info

    ifconfig shaper0 192.168.1.128 netmask 255.255.255.0 broadcast 192.168.1.255 up <enter key>
    route add -net 192.168.1.128 netmask 255.255.255.0 dev shaper0

    the first line appears to be accepted...the second line (route add) always returns with the following
    route: netmask doesn't match route address & then it gives me the help for route

    below is my ifconfig for eth2 & route for all interfaces
    I have no idea what I should be entering but I would surmise that it is wrong as when I use the above values it just makes eth2 stop working.




    eth2 Link encap:Ethernet HWaddr 00:A0:CCA:F2:00
    inet addr:192.168.1.128 Bcast:192.168.1.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:2832 errors:0 dropped:0 overruns:0 frame:0
    TX packets:4196 errors:2 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:831447 (811.9 Kb) TX bytes:5013110 (4.7 Mb)
    Interrupt:9 Base address:0x3000





    [root@martrix1 root]# route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    user-vcaug81.ds * 255.255.255.255 UH 0 0 0 ppp0
    192.168.1.0 * 255.255.255.128 U 0 0 0 eth1
    192.168.1.0 * 255.255.255.0 U 0 0 0 shaper0
    127.0.0.0 * 255.0.0.0 U 0 0 0 lo
    default user-vcaug81.ds 0.0.0.0 UG 0 0 0 ppp0

  4. #4
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:ifconfig

    [quote author=lovswr1 link=board=2;threadid=4862;start=0#48532 date=1031277635]
    ifconfig shaper0 192.168.1.128 netmask 255.255.255.0 broadcast 192.168.1.255 up <enter key>
    route add -net 192.168.1.128 netmask 255.255.255.0 dev shaper0
    [/quote]


    That looks absoulutely perfect. Let me try it out. I have RH7.3 as well. Perhaps if this isnt too rought or timeconsuming I can see whats up.

    [edit]

    If I am not mistaken, for the route, shouldnt the IP be 192.168.1.0 ? Here is a link that I took a look at to be sure. Try that. But, IIRC, you shouldnt need to add a new route unless its on a different subnet. Since you are placing the virtual adapter on the ame subnet you really shouldnt need it. If you placed it on 192.168.2.0/24, then yes you would need to add the route.

    RedHat link

Similar Threads

  1. Changing ip through ifconfig
    By gugabaga in forum Linux - Software, Applications & Programming
    Replies: 8
    Last Post: 11-19-2006, 04:52 AM
  2. ifconfig command does not exist
    By omnivore in forum Linux - General Topics
    Replies: 3
    Last Post: 01-20-2005, 02:44 AM
  3. ifconfig
    By lovswr1 in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 09-21-2002, 02:38 AM
  4. OpenBSD ifconfig
    By in forum BSD
    Replies: 3
    Last Post: 04-14-2002, 07:29 PM
  5. Once again Help with IFCONFIG
    By Rastar in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 01-30-2002, 01:42 PM

Bookmarks

Posting Permissions

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