Welcome to the Linux Foundation Forum!

Routing via aliased interfaces in RHEL

Options

Hi all,

I am having following problem.

RHEL 5.5 won't accept specifying an aliased interface (e.g. eth1:0) when I add a new host route to the routing table of a machine with multiple Ethernet interfaces. I have read that this works with Ubuntu, but RHEL gives problems. It only understands the interface card (e.g. either eth0 or eth1, but does not understand the aliased virtual interfaces within say eth0 or eth1)

Any input would be appreciated

Thanks.

Comments

  • atreyu
    atreyu Posts: 216
    Options
    instead of ifconfig/route, try using the ip tool (belongs to the iproute package).
    first, bring down the device:
    ifdown eth0
    
    to assign two ip addresses to a device:
    ip addr add 192.168.1.2/24 dev eth0
    ip addr add 10.1.1.2/24 dev eth0
    
    to add a default route:
    ip route add default via 10.1.1.1 dev eth0
    
    to show ip configuration for a device:
    ip addr show dev eth0
    

    -bill

Categories

Upcoming Training