Issues Setting up Ethernet Connection

I installed FreeBSD on an old laptop without setting up any networking during instalation and I am now trying to setup an wired connection. I am using Windows Internet Connection Sharing to get internet access as I do not have physical access to my router.

I started trying to set up the connection by following the Networking chapter of the handbook using static IP as I don't believe that Internet Connection Sharing has DHCP, but I am not able to connect to the internet or even ping the computer the laptop is plugged into. When I ping anything other than localhost I get
Code:
ping: sendto: No route to host
I am also not able to ping the laptop from the windows computer.

Can you please help me figure out what I have done wrong?

uname -a
Code:
FreeBSD 14.0-RELEASE FreeBSD 14.0-RELEASE #0 releng/14.0-n265380

ifconfig
View attachment ifconfig.jpg

netstat -rn
View attachment netstat-rn.jpeg

some network information from the computer on the other side of the ethernet cable
windows pc.jpeg
 
Your two IP addresses have a class C mask but are not on the same class C network, number wise.

Intuitively I would say that DHCP should be present, so why not try that?
 
I made the following changes to my /etc/rc.conf
Code:
#ifconfig_alc0="inet 192.168.50.200 netmask 255.255.255.0"
if_config_alc0="DHCP"

when I run dhclient alc0 I get the following output:
Code:
DHCPDISCOVER on alc0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on alc0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on alc0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on alc0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on alc0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on alc0 to 255.255.255.255 port 67 interval 6
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

I have also run service netif restart && service routing restart and retried dhclient alc0 and it was still unsuccessful.

The windows PC has lights around the ethernet port and when dhclient alc0 is running I can see one of them flashing so this does not seem to be a cable issue.

new ifconfig:
Code:
root@freebsd:/etc # ifconfig
alc0: flags=1008843<UP, BROADCAST, RUNNING, SIMPLEX, MULTICAST, LONER_UP> metric 0 mtu 1500
options=c319a<TXCSUM, VLAN_MTU, VLAN_HWTAGGING, VLAN_HWCSUM, TS04, WOL_MCAST, WOL_MAGIC, VLAN_HWTSO 
,LINKSTATE>
    ether 74:00: 2b: 47: eb: 06 
    media: Ethernet autoselect ( 1000baseT <full-duplex>) 
    status: active
nd6 options=29<PERFORMNUD,IFDISABLED, AUTO_LINKLOCAL>
 
I have set a static IP with the same class C mask and now when I try and ping the window computer from FreeBSD I get
Code:
ping:sendto: Host is down

When I ping FreeBSD from Windows the requests timeout.

Windows ethernet IP
Code:
 IPv4 Address 192.168.137.1
Subnet Mask 255.255.255.0

/etc/rc.conf
Code:
clear_tmp_enable="YES"
hostname="freebsd"
sshd_enable="YES"
moused_nondefault_enable="NO"
dumpdev="AUTO"
ifconfig_alc0="inet 129.168.200 netmask 255.255.255.0"
#if_config_alc0="DHCP"
defaultrouter="129.168.137.1"

netstat -rn
View attachment netstat-rn.jpeg
 
I have updated the line in the /etc/rc.comf to
Code:
ifconfig_alc0="inet 192.168.137.200 netmask 255.255.255.0"
and I still get the same response from ping 192.168.137.1
 
I turned off the firewall on windows and I am able to ping the windows PC.

Thank you for your help.
 
Back
Top