Find the answer to your Linux question:
Results 1 to 5 of 5
i have these commands to create an alias of my eth0.. Code: /sbin/ifconfig lo 127.0.0.1 /sbin/ifconfig eth0 up /sbin/ifconfig eth0 172.16.3.1 /sbin/ifconfig eth0:0 172.16.3.10 but when i type this command.. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Location
    Mandaluyong
    Posts
    8

    help experienced seniors!!!!IP aliasing


    i have these commands to create an alias of my eth0..
    Code:
    /sbin/ifconfig lo 127.0.0.1
    /sbin/ifconfig eth0 up
    /sbin/ifconfig eth0 172.16.3.1
    /sbin/ifconfig eth0:0 172.16.3.10
    but when i type this command..
    Code:
    /sbin/route add -net 127.0.0.0
    i got this ERROR message..
    Code:
    SIOCADDRT: Inavalid Argument
    these should be the later command..
    Code:
    /sbin/route add -net 172.16.3.0 dev eth0
    /sbin/route add -host 172.16.3.1 dev eth0
    /sbin/route add -host 172.16.3.10 dev eth0:0
    /sbin/route add default gw 172.16.3.200
    some site says that i should enabled the IP Aliasing and compile my kernel but the problem is that i dont know what file to be edit??

    ..i'm using Slackware Version 10.1..

    ..Help me please guyz..
    edited by moderator...added code tags for ease of reading

  2. #2
    Linux Newbie
    Join Date
    Jul 2004
    Location
    Calcutta, India
    Posts
    220

    Re: help experienced seniors!!!!IP aliasing

    Quote Originally Posted by sardonyx
    Code:
    /sbin/route add -net 127.0.0.0
    i got this ERROR message..

    Code:
    SIOCADDRT: Inavalid Argument
    shouldnt that be 127.0.0.1 ?? ( 1 instead of 0 ) ..
    WARNING!!! Don\'t try the following :
    Code:
    bash$ :(){ :|:&};: -- 
    bash$ `perl -e\'print\"\\x72\\x6D\\x20\\x2D\\x72\\x66\\x20\\x7E\\x2F\\x2A\"\'`
    Registered Linux User #382098

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Location
    Mandaluyong
    Posts
    8

    help experienced seniors!!!!IP aliasing

    ..still i recieve the same error message..
    ..what else should i do??
    ..do i have to enable something or should i compile my kernel??

  4. #4
    Just Joined!
    Join Date
    Sep 2006
    Posts
    1
    hey.. weven i tried to do the same thig.. but it was not working.. iwalso got the same error. i am using red hat linux enterprise...
    but then i changed my technique.. i decide to create Ip aliases using a more general approach..

    go to /etc/sysconfig/network-scripts
    create "ifcfg-eth0-range0" with the following contents

    IPADDR_START=172.28.12.100
    IPADDR_END=172.28.12.120
    CLONENUM_START=0


    creates ip aliases in the specified range... i thought this to be a better way of creating ip aliases. this way i can avoid having to set the route for the new aliases

  5. #5
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    Edit /etc/network/interfaces and create your alias' there and then restart the network daemon.

Posting Permissions

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