hi there,

consider a notebook with two nic's: re0 (ethernet)
and urtwn0 (usb wifi).  let's say, at boot time
there is ethernet connection and /etc/hostname.re0
contains "dhcp".  urtwn0 is not plugged in.

later, i want to switch to wifi.

what i do: insert the usb wifi (/etc/hostname.urtwn0
contains the correct network data), i disconnect the
ethernet cable, route -n flush, ifconfig re0 down,
sh /etc/netstart.

what i expect: network is now through wifi.

what i get: urtwn0 gets an IP, but route shows that the
default route is still trying to go through re0, even if
i comment out dhcp from /etc/hostname.re0

how can i persuade the system to forget about re0?

how is this situation different for /etc/netstart than
booting up with the usb wifi inserted and an empty
/etc/hostname.re0?

what is the correct procedure in a case like this?



$ sudo route -n flush
default              10.10.10.1           done
default              10.10.10.1           done
10.10.10.135         127.0.0.1            done
127/0                127.0.0.1            done
224/0                127.0.0.1            done
::/128               ::1                  done
::/128               ::1                  done
::127.0.0.0/128      ::1                  done
::224.0.0.0/128      ::1                  done
::255.0.0.0/128      ::1                  done
::ffff:0.0.0.0/128   ::1                  done
2002::/128           ::1                  done
2002:7f00::/128      ::1                  done
2002:e000::/128      ::1                  done
2002:ff00::/128      ::1                  done
fe80::/128           ::1                  done
fec0::/128           ::1                  done
ff01::/128           ::1                  done
ff02::/128           ::1                  done

$ route -n show
Routing tables

Internet:
Destination        Gateway            Flags   Refs      Use   Mtu  Prio Iface
127.0.0.1          127.0.0.1          UH         0        0 33196     4 lo0  

Internet6:
Destination                        Gateway                        Flags   Refs  
    Use   Mtu  Prio Iface
::1                                ::1                            UH         0  
      0 33196     4 lo0  
fe80::%re0/64                      link#1                         C          0  
      0     -     4 re0  
fe80::%lo0/64                      fe80::1%lo0                    U          0  
      0     -     4 lo0  
fe80::%urtwn0/64                   link#5                         UC         0  
      0     -     4 urtwn0
ff01::%re0/32                      link#1                         C          0  
      0     -     4 re0  
ff01::%lo0/32                      fe80::1%lo0                    UC         0  
      0     -     4 lo0  
ff01::%urtwn0/32                   link#5                         UC         0  
      0     -     4 urtwn0
ff02::%re0/32                      link#1                         C          0  
      0     -     4 re0  
ff02::%lo0/32                      fe80::1%lo0                    UC         0  
      0     -     4 lo0  
ff02::%urtwn0/32                   link#5                         UC         0  
      0     -     4 urtwn0

question: why don't the re0 lines disappear from the inet6 lines
after ifconfig re0 down?

$ sudo sh /etc/netstart
DHCPREQUEST on urtwn0 to 255.255.255.255 port 67
DHCPREQUEST on urtwn0 to 255.255.255.255 port 67
DHCPACK from 10.10.10.1 (00:22:bb:aa:aa:cc)
bound to 10.10.10.136 -- renewal in 604780 seconds.

$ route -n show
Routing tables

Internet:
Destination        Gateway            Flags   Refs      Use   Mtu  Prio Iface
default            10.10.10.1         GSP        4        6     -     8 re0  
                                                                        ^^^
default            10.10.10.1         GS         0        0     -     8 re0  
                                                                        ^^^
10.10.10.136       127.0.0.1          UGHS       0        0 33196     8 lo0  
127/8              127.0.0.1          UGRS       0        0 33196     8 lo0  
127.0.0.1          127.0.0.1          UH         1        0 33196     4 lo0  
224/4              127.0.0.1          URS        0        0 33196     8 lo0  

Internet6:
Destination                        Gateway                        Flags   Refs  
    Use   Mtu  Prio Iface
::/104                             ::1                            UGRS       0  
      0     -     8 lo0  
::/96                              ::1                            UGRS       0  
      0     -     8 lo0  
::1                                ::1                            UH        14  
      0 33196     4 lo0  
::127.0.0.0/104                    ::1                            UGRS       0  
      0     -     8 lo0  
::224.0.0.0/100                    ::1                            UGRS       0  
      0     -     8 lo0  
::255.0.0.0/104                    ::1                            UGRS       0  
      0     -     8 lo0  
::ffff:0.0.0.0/96                  ::1                            UGRS       0  
      0     -     8 lo0  
2002::/24                          ::1                            UGRS       0  
      0     -     8 lo0  
2002:7f00::/24                     ::1                            UGRS       0  
      0     -     8 lo0  
2002:e000::/20                     ::1                            UGRS       0  
      0     -     8 lo0  
2002:ff00::/24                     ::1                            UGRS       0  
      0     -     8 lo0  
fe80::/10                          ::1                            UGRS       0  
      0     -     8 lo0  
fe80::%re0/64                      link#1                         C          0  
      0     -     4 re0  
fe80::%lo0/64                      fe80::1%lo0                    U          0  
      0     -     4 lo0  
fe80::%urtwn0/64                   link#5                         UC         0  
      0     -     4 urtwn0
fec0::/10                          ::1                            UGRS       0  
      0     -     8 lo0  
ff01::/16                          ::1                            UGRS       0  
      0     -     8 lo0  
ff01::%re0/32                      link#1                         C          0  
      0     -     4 re0  
ff01::%lo0/32                      fe80::1%lo0                    UC         0  
      0     -     4 lo0  
ff01::%urtwn0/32                   link#5                         UC         0  
      0     -     4 urtwn0
ff02::/16                          ::1                            UGRS       0  
      0     -     8 lo0  
ff02::%re0/32                      link#1                         C          0  
      0     -     4 re0  
ff02::%lo0/32                      fe80::1%lo0                    UC         0  
      0     -     4 lo0  
ff02::%urtwn0/32                   link#5                         UC         0  
      0     -     4 urtwn0

-f
-- 
i plan to live forever or die trying.

Reply via email to