🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.networking
Article #602

Re: Dummy net device driver

#602
From: Leon Garde
Date: Sat, 08 Apr 1995 00:00
105 lines
4623 bytes
>Robert Virding (rv@erix.ericsson.se) wrote:

>: Can anyone point me in the direction to some documentation for the
>: dummy net device driver? I have found a reference in the NET-2 howto
>: and in the source code but neither tells you how to use it.

>Following on from this, I have a problem that _may_ be solved by the
>dummy driver.

>Currently my machine name (dreamtim.demon.co.uk) has an IP address assigned
>to it by my IP provider - this being my SLIP port. At the moment this is
>my actual machine hostname, aswell as the entry in "hosts" for my SLIP IP
>address. The problem I am having is in routing - I cannot use talk locally,
>as I get this error:
>[Couldn't bind to control socket : Cannot assign requested address (99)]
>Also, I have the CERN httpd (v3), which looks for "dreamtim.demon.co.uk".

>Both of these (and possibly other) problems seem due to the fact that they
>cannot "see" the SLIP interface when it is not up. I compiled the
>dummy i/f driver into my kernel, and issued the following command:
>ifconfig dummy xxx.xxx.xxx.xxx 
>(where xxx.xxx.xxx.xxx is the IP address of my SLIP port), but it still
>had the same problems (I assume because "dummy" does not transmit packets ...
>so how does it help in routing?). Someone mentioned to me that "dummy" had


no, dummy does  not need to be taken down to use slip.
and dummy DOES NOT NEED to have a route to it.


here is my ifconfig and routing table while using slip.

(the only difference is the presence of the sl0 device,   the
 route to the slip server through the sl0 device and the default route.
 without slip there is no default route, and no route through the sl0 interface
 and the sl0 device is not ifconfig'ed.
)

just set it up like this. (the numbers have been changed to protect
the innocent. you cant reach these machines from the internet directly;
only via mail or news. )


the main trick is to set dummy to your real ip address,
but use a route that sends all packets for your ip address to
the lo device. without the dummy interface , the kernel does not
know what its real ip address is .. 


$ ifconfig

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.255.255.0
          UP BROADCAST LOOPBACK RUNNING  MTU:2000  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0
          TX packets:56 errors:0 dropped:0 overruns:0

dummy     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-F7-00-00-00-00-00-00-00-00
          inet addr:240.90.1.13  Bcast:240.90.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0
          TX packets:0 errors:0 dropped:0 overruns:0
          Interrupt:0 Base address:0x0 

sl0       Link encap:VJ Serial Line IP  
          inet addr:240.90.1.13  P-t-P:240.90.1.45  Mask:255.255.255.0
          UP POINTOPOINT RUNNING  MTU:400  Metric:1
          RX packets:0 errors:0 dropped:0 compressed:0
          TX packets:0 errors:0 dropped:0 compressed:0

$ route -n

Kernel routing table
Destination     Gateway         Genmask         Flags MSS    Window Use Iface
127.0.0.1       *               255.255.255.255 UH    1936   0       64 lo
240.90.1.13     *               255.255.255.255 UH    1936   0        0 lo
240.90.1.45     *               255.255.255.255 UH    336    0        0 sl0
default         240.90.1.45     *               UG    336    0        0 sl0



ok, to be clear you do these things to set up for normal
(no slip) conditions ...


ifconfig lo 127.0.0.1
ifconfig dummy xx.xx.xx.xx
route add 127.0.0.1 dev lo
route add xx.xx.xx.xx dev lo

then whatever you use to start slip will not need to change any of
that ; it will just need to do these things  to bring up slip

ifconfig sl0 xx.xx.xx.xx
route add yy.yy.yy.yy dev sl0
route add default gw yy.yy.yy.yy

and delete these settings to shut slip down.


leon
-- 

leon@cleopatra.hna.com.au
lgarde@scorch.hna.com.au
Technical Details
Message-ID: <3m4vnt$11t@cleopatra.hna.com.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3kjsv8$4fh@euas20.eua.ericsson.se> <3l71mj$9m@dreamtim.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fac57,9ca8f4d16fa021f0
X-Google-Attributes: gidfac57,public
X-Google-Thread: 10669a,9ca8f4d16fa021f0
X-Google-Attributes: gid10669a,public
From: leon@Cleopatra.hna.com.au (Leon Garde)
Subject: Re: Dummy net device driver
Date: 1995/04/08
Message-ID: <3m4vnt$11t@cleopatra.hna.com.au>
X-Deja-AN: 100066252
references: <3kjsv8$4fh@euas20.eua.ericsson.se> <3l71mj$9m@dreamtim.demon.co.uk>
organization: the Hunter Network Association
newsgroups: comp.os.linux.networking,demon.tech.unix