/usr/share/doc/initscripts-8.45.19.1.EL/sysconfig.txtをへろへろ見ていくと、
こんな部分があって、
/etc/sysconfig/network-scripts/ifcfg-and
/etc/sysconfig/network-scripts/ifcfg-: :
The first defines an interface, and the second contains
only the parts of the definition that are different in a
"alias" (or alternative) interface. For example, the
network numbers might be different, but everything else
might be the same, so only the network numbers would be
in the alias file, but all the device information would
be in the base ifcfg file.
The items that can be defined in an ifcfg file depend on the
interface type. The really obvious ones I'm not going to
bother to define; you can figure out what "IPADDR" is, I
think... :-)
これにしたがって、/etc/sysconfig/network-scriptsに設定を追加。
-rw-r--r-- 5 root root 277 Mar 31 09:22 ifcfg-eth0
-rw-r--r-- 3 root root 257 Apr 1 01:08 ifcfg-eth1
-rw-r--r-- 1 root root 122 Apr 1 01:09 ifcfg-eth1:0
-rw-r--r-- 1 root root 122 Apr 1 01:10 ifcfg-eth1:1
な感じ。再起動して確認。
[nori@housyou]/etc% /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:19:DB:62:B9:9F
inet addr:192.168.2.64 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::219:dbff:fe62:b99f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1487 errors:0 dropped:0 overruns:0 frame:0
TX packets:3466 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:201929 (197.1 KiB) TX bytes:622530 (607.9 KiB)
Interrupt:21 Base address:0xa800
eth1 Link encap:Ethernet HWaddr 00:90:CC:EF:8C:3F
inet6 addr: fe80::290:ccff:feef:8c3f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3822 errors:0 dropped:0 overruns:0 frame:0
TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:306202 (299.0 KiB) TX bytes:1608 (1.5 KiB)
Interrupt:17 Base address:0xec00
eth1:0 Link encap:Ethernet HWaddr 00:90:CC:EF:8C:3F
inet addr:192.168.2.65 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:17 Base address:0xec00
eth1:1 Link encap:Ethernet HWaddr 00:90:CC:EF:8C:3F
inet addr:192.168.2.66 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:17 Base address:0xec00
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1525 errors:0 dropped:0 overruns:0 frame:0
TX packets:1525 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2084924 (1.9 MiB) TX bytes:2084924 (1.9 MiB)
さらに、maradnsの設定をやり直す。http://www.maradns.org/tutorial/dangling.htmlを読むが、
ipv4_bind_addresses = "192.168.1.1"
chroot_dir = "/etc/maradns"
recursive_acl = "192.168.1.0/24"
upstream_servers = "192.168.1.2"
が設定ファイルの文法として間違っていて、http://www.maradns.org/faq.html#upstream_dを読むと、
ipv4_bind_addresses = "192.168.1.1"
chroot_dir = "/etc/maradns"
recursive_acl = "192.168.1.0/24"
upstream_servers = {}
upstream_servers["."] = "192.168.1.2"
と書かねばならない。
[nori@housyou]/etc% dig @192.168.2.65 blog.tonic-water.com
; <<>> DiG 9.3.4-P1 <<>> @192.168.2.65 blog.tonic-water.com
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2585
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;blog.tonic-water.com. IN A
;; ANSWER SECTION:
blog.tonic-water.com. 900 IN CNAME ghs.google.com.
ghs.google.com. 900 IN A 72.14.235.121
;; Query time: 12 msec
;; SERVER: 192.168.2.65#53(192.168.2.65)
;; WHEN: Wed Apr 1 01:42:09 2009
;; MSG SIZE rcvd: 79
これでめでたくLANでprimary dnsに192.168.2.65を指定すればほしいものが引けるようになった。
0 件のコメント:
コメントを投稿