Getting wrong IP in my ping command

Hello!

I'm new in FreeBSD, and I have a problem with the ping command. Part of which commands I have in my /etc/rc.conf, where I’m initializing my network cards:

Code:
ifconfig_re0="DHCP"
ifconfig_em0="inet 192.168.1.1 netmask 255.255.255.0"

And in /etc/start_if.re0:

Code:
#!/bin/sh
ifconfig re0 ether XX:XX:XX:XX:XX:XX

After this everything is fine, but then I’m making a ping to my re0 or em0 network cards. I’m getting the same strange IP in response, which is not mine. E.g., ping to my re0 network card should return 192.168.1.1 and ping to my re0 card should return my global IP (as I think :)). I don’t know from where my problem is coming. Please, help.
 
Can you post the output of # ping -c 4 192.168.1.1 and [cmd=]arp -an[/cmd]?
 
Yes :), output of commands:

ping -c 4 192.168.1.1:
Code:
64 bytes from 192.168.1.1: icmp_seq=0 ttl=255 time=0.180 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=0.131 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=0.147 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=255 time=0.127 ms

arp -an:
Code:
? (192.168.1.74) at xx:xx:xx:xx:xx:xx on em0 expires in 1169 seconds [ethernet]
? (192.168.1.2) at xx:xx:xx:xx:xx:xx on em0 expires in 1188 seconds [ethernet]
? (192.168.1.33) at xx:xx:xx:xx:xx:xx on em0 expires in 1061 seconds [ethernet]
? (192.168.1.1) at xx:xx:xx:xx:xx:xx on em0 permanent [ethernet]
? (192.168.1.102) at xx:xx:xx:xx:xx:xx on em0 expires in 838 seconds [ethernet]
? (192.168.1.51) at xx:xx:xx:xx:xx:xx on em0 expires in 1174 seconds [ethernet]
? (192.168.1.16) at xx:xx:xx:xx:xx:xx on em0 expires in 1128 seconds [ethernet]
? (192.168.1.17) at xx:xx:xx:xx:xx:xx on em0 expires in 1193 seconds [ethernet]
? (192.168.1.87) at xx:xx:xx:xx:xx:xx on em0 expires in 1193 seconds [ethernet]
? (10.xx.xx.xx at xx:xx:xx:xx:xx:xx on re0 expires in 1199 seconds [ethernet]
? (212.xx.xx.xx) at xx:xx:xx:xx:xx:xx on re0 expires in 601 seconds [ethernet]
? (212.xx.xx.xx) at xx:xx:xx:xx:xx:xx on re0 permanent [ethernet]
 
And what I'm getting when performing my ping command:
ping -c 4 re0
Code:
PING re0.bla.bla.com (66.114.xxx.xxx): 56 data bytes
64 bytes from 66.114.xxx.xxx: icmp_seq=0 ttl=46 time=177.545 ms
64 bytes from 66.114.xxx.xxx: icmp_seq=1 ttl=46 time=177.027 ms
64 bytes from 66.114.xxx.xxx: icmp_seq=2 ttl=46 time=178.979 ms
64 bytes from 66.114.xxx.xxx: icmp_seq=3 ttl=46 time=176.609 ms

I don't know from where is this 66.114.xxx.xxx IP address.
 
Haha.. Ok, your newbieness really shines through now. You're pinging the hostname re0, not the interface.
 
Back
Top