2007年11月19日月曜日

XORP の ospf6

制約っぽいのですが XORP 1.4 の release notes に
- The OSPFv3 configuration allows multiple instances to be configured however only one instance will be created. Configuring multiple OSPFv3 instances is guaranteed to cause problems.
なる記述あり。で config.boot に
potocol ospf6 10
とすると? しても? instance ID を 0 として Hello を投げ、受け取った側は instance ID が 10 じゃない。といったログ....消してしまった.... が残る。なので
protocol ospf6 0
としたところ、まぁ、動いた。

2007年11月7日水曜日

tcpdump で 802.1q

vconfig で vlan 作ったけど tcpdump で見えない。って話、結構ホットな内容かも。expected behavior of PF_PACKET on NETIF_F_HW_VLAN_RX device? を例のごとく一瞥すると NETIF_F_HW_VLAN_RX feature が on となっているデバイスの場合 tcpdump で見る時には vlan ヘッダが無い? とか。include/linux/netdevice.hにて
#define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */
現在利用しているデバイスの feature は cat /sys/class/net/eth#/features あたりを見ると 0x113a9 と 0x180。これかなぁ....

2007年11月6日火曜日

using lguest - 3

先日のネットワーク絵の設定。debian パッケージでは bridge-utils と vlan あたり。vlan パッケージ入れて vlan-interfaces (5) を見ると /etc/network/interfaces で vlan の設定ができるらしい。そうそう先日の絵で eth1.1 なんて書いていたが

/opt/lguest# vconfig add eth1 1
Added VLAN with VID == 1 to IF -:eth1:-
WARNING: VLAN 1 does not work with many switches,
consider another number if you have problems.
なんて言われるので eth1.10 と eth1.11 にしてしまった。肝心の /etc/network/interfaces は以下の通り
auto eth1.10
iface eth1.10 inet static
# vlan-raw-device eth1
address 172.27.129.1
broadcast 172.27.129.255
netmask 255.255.255.0
iface eth1.10 inet6 static
address fec0:0:0:1b81:201:8eff:feb3:84d8
netmask 64

auto br0
iface br0 inet static
pre-up brctl addbr $IFACE
address 192.168.0.3
netmask 255.255.255.0
post-down brctl delbr $IFACE

auto br1
iface br1 inet manual
pre-up brctl addbr $IFACE
post-up ip link set $IFACE up
pre-down ip link set $IFACE down
post-down brctl delbr $IFACE
auto br2
iface br2 inet manual
pre-up brctl addbr $IFACE
post-up ip link set $IFACE up
pre-down ip link set $IFACE down
post-down brctl delbr $IFACE

auto eth1.11
iface eth1.11 inet manual
post-up brctl addif br1 $IFACE
post-up ip link set $IFACE up
pre-down ip link set $IFACE down
pre-down brctl delif br1 $IFACE
まぁ IPv6 はご愛嬌。これで lguest を
./lguest 64m /usr/src/stable/vmlinux --block=FW1.img --block=FW1.swap root=/dev/lgba \
--tunnet=bridge:br0 --tunnet=bridge:br1 --tunnet=bridge:br2
と起動するとゲスト FW1 FW2 では eth0 eth1 eth2 が見える。こちらも以前書いたが、これらに対応するホスト側は (ユーザスペースコマンドの) lguest で tap# を作って、それぞれのブリッジインターフェースに addif してくれる。

通信できることはできるのだけど、とっても気になるのが eth1 での 802.1q。ホント喋っているのか tcpdump で確認できず。もう少々要確認ってトコ。

2007年11月1日木曜日

ネットワーク絵


目指すはっ。と構えるほど大それたものではないが、絵としては この辺り に近い構成を host と guest で作成して色々試そうかと。大きな四角がホストで中の小さな二つの四角がゲスト。赤太字がインターフェースで○はアドレスを持つ。実際の設定は....後日。

2007年10月31日水曜日

....

会ったことも無く当然私などを知っているはずは無いが、おこがましくも尊敬する itojun さんが亡くなられたとのおはなし。自身の語彙不足を今更ながら恨めしく....心からのご冥福をお祈りします。

2007年10月30日火曜日

using lguest - 2

ちょっと使えるようになるまで、また jot。
/opt/lguest# mount -t ext3 -o loop FW1.img tmp
/opt/lguest# chroot tmp
/# apt-get install udev iproute less
Reading package lists... Done
Building dependency tree... Done
....
/# cat >> /etc/fstab
proc /proc proc defaults 0 0
/dev/lgba / ext3 defaults,errors=remount-ro 0 1
/dev/lgbb none swap sw 0 0
/# cat > /etc/resolv.conf
nameserver 192.168.0.3
/# cat >> /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.3
/#
/# cat > /etc/hostname
fw1
/# exit
/opt/lguest# dd if=/dev/zero of=FW1.swap bs=1 count=1 seek=$((1024 * 1024 * 128 - 1))
1+0 records in
1+0 records out1+0 records in
1+0 records out
1 byte (1 B) copied, 0.000128516 seconds, 7.8 kB/s
/opt/lguest# mkswap FW1.swap
Setting up swapspace version 1, size = 134213 kB
no label, UUID=69713635-6d63-4cd9-b0da-96d1eb7fe561
/opt/lguest# brctl addbr br0
/opt/lguest# ip addr add 192.168.0.3/24 dev br0
/opt/lguest# ip link set br0 up
/opt/lguest# umount tmp
/opt/lguest# ./lguest 64m /usr/src/stable/vmlinux --block=FW1.img --block=FW1.swap root=/dev/lgba --tunnet=bridge:br0
....
Debian GNU/Linux lenny/sid fw1 /dev/hvc0

fw1 login: root
Last login: Tue Oct 30 14:08:48 UTC 2007 on hvc0
Linux fw1 2.6.23.1 #1 Wed Oct 17 13:58:03 JST 2007 i686

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
fw1:~#
fw1:~# ping -c3 192.168.0.3
PING 192.168.0.3 (192.168.0.3) 56(84) bytes of data.
64 bytes from 192.168.0.3: icmp_seq=1 ttl=64 time=7.64 ms
64 bytes from 192.168.0.3: icmp_seq=2 ttl=64 time=0.266 ms
64 bytes from 192.168.0.3: icmp_seq=3 ttl=64 time=0.262 ms

--- 192.168.0.3 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 0.262/2.724/7.644/3.478 ms
fw1:~# mount
/dev/lgba on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fw1:~# swapon -s
Filename Type Size Used Priority
/dev/lgbb partition 131064 0 -1
fw1:~# apt-get update
Get:1 http://ring.asahi-net.or.jp lenny Release.gpg [189B]
Hit http://ring.asahi-net.or.jp lenny Release
Get:2 http://ring.asahi-net.or.jp lenny/main Packages/DiffIndex [2038B]
Fetched 2227B in 2s (989B/s)
Reading package lists... Done
fw1:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
fw1:~# apt-get install ssh deborphan
....
fw1:~# useradd -d /home/chamaken -G users chamaken -m
fw1:~# passwd chamaken
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
fw1:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/lgba 2.0G 266M 1.7G 14% /
tmpfs 30M 0 30M 0% /lib/init/rw
udev 10M 20K 10M 1% /dev
tmpfs 30M 4.0K 30M 1% /dev/shm
fw1:~# shutdown -h now
Saving the system clock..
hwclock[1215] general protection eip:804aacb esp:bff53fc4 error:0
/etc/rc0.d/K25hwclock.sh: line 48: 1215 Segmentation fault /sbin/hwclock --systohc $GMT $HWCLOCKPARS $BADYEAR
....
lguest: CRASH: Power down
と、まぁまぁ使えるようになりましたっと。``さて'' という字は尻へんに長いと書く。と言っているおじさんがいました。

2007年10月22日月曜日

rtl8187 動作せず...

やっぱりダメらしい。
~# cat /sys/bus/usb/devices/2-2/product
NETGEAR WG111v3
Web 探してみると v2 で asic_rev = 1。更に rf_init = rtl8225z2_rf_init っぽかったのでベタで試してみたところ、ウンとは言うがスンとは言わず。といった感じ。 zd1211rw も bcm43xx も mac802.11 じゃないけど、この辺り使うしか無いのかしら....

madwifi も方向転換で HAL 使わなくなって、以前のものから仕切り直しっぽい。そうそう svn のリポジトリ が再構成 Repository restructured ¶ だそうだ。stable は svn switch http://svn.madwifi.org/madwifi/trunk だそうだ。