X web hosting - The default line discipline chosen by slattach is
The default line discipline chosen by slattach is CSLIP. You may choose any other discipline using the -p switch. To use normal SLIP (no compression), you use: # slattach -p slip /dev/ttyS3 & The disciplines available are listed in Table 7.1. A special pseudo-discipline is available called adaptive, which causes the kernel to automatically detect which type of SLIP encapsulation is being used by the remote end. Table 7.1: Linux Slip-Line Disciplines Disclipline Description slip Traditional SLIP encapsulation. cslip SLIP encapsulation with Van Jacobsen header compression. slip6 SLIP encapsulation with six-bit encoding. The encoding method is similar to that used by the uuencode command, and causes the SLIP datagram to be converted into printable ASCII characters. This conversion is useful when you do not have a serial link that is eight bit clean. cslip6 SLIP encapsulation with Van Jacobsen header compression and six-bit encoding. adaptive This is not a real line discipline; instead, it causes the kernel to attempt to identify the line discipline being used by the remote machine and to match it. Note that you must use the same encapsulation as your peer. For example, if cowslip uses CSLIP, you also have to do so. If your SLIP connection doesn’t work, the first thing you should do is ensure that both ends of the link agree on whether to use header compression or not. If you are unsure what the remote end is using, try configuring your host for adaptive slip. The kernel might figure out the right type for you. slattach lets you enable not only SLIP, but other protocols that use the serial line, like PPP or KISS (another protocol used by ham radio people). Doing this is not common, though, and there are better tools available to support these protocols. For details, please refer to the slattach(8) manual page. After turning over the line to the SLIP driver, you must configure the network interface. Again, you do this using the standard ifconfig and route commands. Assume that we have dialed up a server named cowslip from vlager. On vlager you would execute: # ifconfig sl0 vlager-slip pointopoint cowslip # route add cowslip # route add default gw cowslip The first command configures the interface as a point-to-point link to cowslip, while the second and third add the route to cowslip and the default route, using cowslip as a gateway. Two things are worth noting about the ifconfig invocation: The pointopoint option that specifies the address of the remote end of a point-to-point link and our use of vlager-slip as the address of the local SLIP interface. We have mentioned that you can use the same address you assigned to vlager’s Ethernet interface for your SLIP link, as well. In this case, vlager-slip might just be another alias for address 172.16.1.1. However, it is also possible that you have to use an entirely different address for your SLIP link. One such case is when your network uses an unregistered IP network address, as the Brewery does. We will return to this scenario in greater detail in the next section.