# Does SLIP supports Broadcast addressing?



## alexe100 (Aug 18, 2009)

Hi all.
I have a freebsd box with IP 192.168.1.5. The serial port has a cable connecting freebsd and an external device. 
I set an IP address to the external device (serial port) using:


```
slattach -l -f -s 2400 /dev/cuad0
ifconfig sl0 192.168.1.5 192.168.1.9
route add -host 192.168.1.9 192.168.1.5
```

and I can communicate using TCP/IP sockets with the external device. I have also a windows box on the same network with the ip 192.168.1.2. If I add the following command to windows box I can reach the external device from windows box too.


```
route add 192.168.1.2 mask 255.255.255.255 192.168.1.9
```

So, it seems that everything works fine.


Now I would like to configure the sl0 interface to send broasctas traffic to the external device too. Please, could you tell me how to configure the sl0 to support broadcast or multicast?

I am trying this on the freebsd box


```
slattach -l -f -s 2400 /dev/cuad0
ifconfig sl0 broadcast 192.168.1.255 192.168.1.5 192.168.1.9
route add -host 192.168.1.9 192.168.1.5
```

But when I run the ifconfig -a command I just see this for the sl0 interface:


```
sl0:flags=108011<UP,POINTTOPOINT,MULTICAST,NEEDSGIANT> metric 0 mtu 552
inet 192.168.1.5 --> 192.168.1.9 netmask 0xffffff00
```

1. Why BROADCAST flag is not turned on? How can i turn it on?

2. It says that multicast flag is on. Does sl0 receives multicast msgs using this configuration? If so, what is the ip address to send multicast to sl0?

Thanks a lot

Alex


----------



## SirDice (Aug 18, 2009)

SLIP is a point-to-point protocol. You cannot have more then 2 nodes on it.


----------



## alexe100 (Aug 18, 2009)

Ok, but does that means that it could not receive the LAN broadcasts? Sorry, I did not understood.


Suppose a LAN with 5 free bsd nodes. Only one freebsd node has an external device attached.
Is it possible for the external device to receive the broadcast traffic of the LAN? Is there any trick to do that?


Now I am using this configuration on the bsd box that has the external device:



```
slattach -l -f -s 2400 /dev/cuad0
ifconfig sl0 broadcast 192.168.1.255 192.168.1.5 192.168.1.9
arp -s 192.168.1.9 00:50:da:7b:49:38 pub
```

and the external device (192.168.1.9) is perfectly known on all LAN hosts. Any host can make ping 192.168.1.9 with success.

if a node sends broadcast info all other nodes receive it. Why external device (192.168.1.9) do not receives it?

Thanks a lot

Alex


----------



## DutchDaemon (Aug 18, 2009)

Please start using 
	
	



```
tags, alexe100.
```


----------



## SirDice (Aug 18, 2009)

The netmask on you SLIP connection is wrong. As it's a point-to-point that can only have 2 nodes it has to be a /30 (255.255.255.252). One network address, 2 nodes and 1 broadcast. If you don't set this properly you can have all sorts of weird connectivity problems.

To communicate with the other nodes you need to setup routing between the different subnets. Normally a (subnet) broadcast isn't routed and it's not recommended fixing that (it defeats the purpose of a broadcast domain). In some cases however you need to forward a broadcast (think DHCP request), most of the time this can be solved by using 'helpers' (Cisco calls it ip-helper and for DHCP you would need a DHCP relay).


----------



## alexe100 (Aug 18, 2009)

Please, could you provide the entire command lines? Sorry, I cant figure out the command where i need to use your proposed mask.

So, i need to use a broadcast relay, right?


By the way, if the external device has a LAN IP (192.168.1.9) why IP 192.168.1.9 do not belong to the set of IPs that will be addressed by LAN broadcast messages? Why is that IP address excluded from broadcasting?


Thanks

Alex


----------



## SirDice (Aug 18, 2009)

It's been way too long ago since I used SLIP. I need to dig into this before I can give any sensible answers.


----------

