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've had a /29 provisioned on a network port for a server and am trying to at least configure the machine so I can ssh into it. It's Centos 6.2 x64 with the Basic Server install. Currently not able to ping gateway or any address for that matter.

For reference:

Default Interface: em2
Network ID: 66.*.*.0/29
Gateway: 66.*.*.1
Broadcast: 66.*.*.7

Please see my following configs:

/etc/sysconfig/network-scripts/ifcfg-em2

DEVICE=em2
NM_CONTROLLED=yes
ONBOOT=yes
HWADDR=Not Important
TYPE=Ethernet
BOOTPROTO=none
IPADDR=66.*.*.2
PREFIX=29
DNS1=8.8.8.8
DNS2=8.8.4.4
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System em2"
NETMASK=255.255.255.248
USERCTL=no
$: route -n
Destination // Gateway // Genmask // Flags // Metric // Ref // Use // Iface
66.*.*.0       0.0.0.0    255.255.255.248   U   0   0     0  em2
169.254.0.0    0.0.0.0    255.255.0.0       U   0   1003  0  em2
0.0.0.0        66.*.*.1   0.0.0.0           UG  0   0     0  em2
$: route
Destination // Gateway // Genmask // Flags // Metric // Ref // Use // Iface
66.*.*.0       *          255.255.255.248   U   0   0     0  em2
link-local     *          255.255.0.0       U   0   1003  0  em2
default        66.*.*.1   0.0.0.0           UG  0   0     0  em2
$: cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=excalibur.domain.com
GATEWAY=66.*.*.1

Keep in mind that I cannot even currently ping the gateway which is quite confusing for me. My /etc/hosts are configured correctly with the *.2 address. I'm not concerned with getting all of the addresses on the /29 up and running yet, just one so I can at least ssh in.

Thanks!

Edit: Adding in ifconfig.

$: ifconfig

em2     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
        inet addr:66.*.*.2  Bcat:66.*.*.7  Mask:255.255.255.248
        inet6 addr: 
        UP BROADCAST RUNNING MULTICAST  MTU:1500 Metric:1
        RX packets:5536 errors:0 dropped:0 overruns:0 frame:0
        TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:1000
        RX bytes:2599469 (2.4 MiB)  TX bytes: 748 (748.0 b)
        Interrupt:48 Memory:dc000000-dc012800

lo      Link encap:Local Loopback
        inet addr:127.0.0.1  Mask:255.0.0.0
        inet6 addr: ::1/128 Scope:Host
        UP LOOPBACK RUNNING MTU:16436 Metric:1
        RX packets:34 errors:0 etc etc
share|improve this question
    
And ifconfig? –  Ignacio Vazquez-Abrams May 3 '12 at 3:29
    
What are you using as a gateway? What is your network setup (are there routing machines in between etc)? If you cannot ping your gateway and your source ping machine is on the other side there may be other network problems. –  ank May 3 '12 at 6:45
    
@ank: I'm directly connected to a FastEthernet port on the router. Vlan, ip secondary configured correctly, port is up. From the router we're able to ping the gateway, but from the machine we're not. IgnacioVazquez-Abrams, I'm away from the machine now and can't access it quite yet. –  RWC May 3 '12 at 8:40
    
Ping is a round-trip thing. If you can ping from your router to the machine the network is up. Simply means your router likely has protections and will not answer to ping's coming in. A good thing actually - but confusing in the first stages. Can you ssh TO the machine from the router? –  ank May 4 '12 at 10:51
    
@ank I am not currently able to ping out at all to any address from the machine. I am unable to ssh from the router to the machine as well. ifconfig on the way. –  RWC May 6 '12 at 23:03

1 Answer 1

Your routes and configuration look fine.

$: route -n
Destination // Gateway // Genmask // Flags // Metric // Ref // Use // Iface
66.*.*.0       0.0.0.0    255.255.255.248   U   1003      0   0     0  em2
0.0.0.0        66.*.*.1   0.0.0.0           UG     0      0   0     0  em2

The first route, 66.*.*.0/29 with gateway 0.0.0.0 tells your computer to use interface em2 and then make an arp request to find the hardware address of the host you're trying to reach. This is a "connected" route.

The second one is the default route, pointing at your default gateway through em2. If you need to send a packet in another network than 66.*.*.0/29, your computer will make an arp request to find 66.*.*.1 and then send the packets to it.

The only thing in your configuration that could be an issue is the NM_CONTROLLED=yes statement in /etc/sysconfig/network-scripts/ifcfg-em2. This tells the system that this interface is controlled by NetworkManager. This could interfere with your static configuration.

However, even without any default gateway you should be able to ping and ssh from the 66.*.*.0/29 subnet to your machine.

Check layer 1 first, and ensure that the cable is plugged on each side. Use leds on nic and switch, and check if the system sees it correctly:

# mii-tool
eth0: negotiated 1000baseT-FD flow-control, link ok

Then verify if any iptables are dropping the packets. Use iptables -L or iptables-save to check for any rules, and iptables -D <rule> to delete them. Pay attention to the default policy.

Also, on some systems, NetworkManager can configure ufw automatically, and I've had issues with static interface configuration that wasn't seen by NM and hence blocked by ufw.

share|improve this answer

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.