Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm sort of new at linux networking. I set the ip address of an interface (eth1) as follows...

/sbin/ip link set eth1 down
/sbin/addr addr add 130.30.5.15/24 dev eth1
/sbin/ip link set eth1 up

However, when I type ifconfig I get...

eth1      Link encap:Ethernet  HWaddr 00:0E:0C:E5:F0:B5  
          inet addr:130.30.5.3  Bcast:0.0.0.0  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:96945 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2466 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:6460544 (6.1 Mb)  TX bytes:164386 (160.5 Kb)
          Base address:0x2000 Memory:b8800000-b8820000 

Why is the broadcast 0.0.0.0? Does this mean it will just use the default broadcast (130.30.5.255)? Or is there some way I need to set it? I've tried using this interface but I can't ping any other devices on the network.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

change your call to:

/sbin/ip addr add 130.30.5.15/24 broadcast 130.30.5.255 dev eth1

to get the broadcast correct, guessing 130.30.5.255 is your correct broadcast address.

but be aware that the ip address will vanish with the next reboot. you have to specify it in an interface file to make it permanent. in suse it is e.g. /etc/sysconfig/network/ifcfg-eth1. there are normally also some gui tools to do the network configuration, in suse it is yast, in redhat it is system-config-network.

share|improve this answer
    
Hah, I'm even using SUSE. That worked, thanks. –  Pace Feb 12 '10 at 14:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.