- 追加された行はこの色です。
- 削除された行はこの色です。
*NetWork [#na9a6dd7]
RIGHT:更新日&lastmod();
**ipアドレスの追加及びルーティング情報の追加 [#ud061bbe]
ネットワークのON/OFF
/sbin/ifconfig eth0:0 down
/sbin/ifconfig eth0:0 up
/sbin/ifconfig eth0:0 192.244.75.3
ipアドレスの追加:
/sbin/ifconfig eth0:1 192.244.75.3
/sbin/ifconfig eth0:2 192.244.75.5
ルーティング情報の追加/更新:
/sbin/route add default gw 192.244.75.21
/sbin/route del default gw 192.244.75.21
/sbin/route add -net 192.244.75.0 gw 10.0.0.2 netmask 255.255.255.0 metric 1
/sbin/route add -net 10.0.0.0 netmask 255.0.0.0 eth0
defaultゲートウェイの追加:
/sbin/route add -net default gw 192.244.75.9
ネットワークの接続状態表示
netstat --numeric-ports
稼働中のインターネット接続(w/oサーバー)
Proto 受信-Q 送信-Q 内部アドレス 外部アドレス 状態
tcp 0 0 192.244.75.253:4040 192.244.75.254:1035 ESTABLISHED
tcp 0 140 192.244.75.253:22 219.109.252.82:6307 ESTABLISHED
稼働中のUNIXドメインソケット (w/oサーバー)
Proto RefCnt フラグ タイプ 状態 Iノード パス
unix 13 [ ] DGRAM 678 /dev/log
unix 3 [ ] STREAM CONNECTED 1621498
------------中略------------------------------------------------
**ネットワークデバイスの設定等 [#pf590563]
/etc/sysconfigの中にもあるがデバイス名については
''/etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rule written by anaconda)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:40:ca:97:92:63", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
にある
にある~
Ghost等でデュプリケートした場合は70-persistent-net.rulesを削除して再起動すると
新しく作成される。
また Vine5.xからネットワークの起動が~
/etc/rc.d/init.d/network から /etc/rc.d/init.d/NetworkManager
に変更になったようだ
&color(red){しかし、NetworkManagerがいまいち動作がわからないので、NetworkManagerを止めて networkに変更する};
NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off
(略)
network 0:off 1:off 2:off 3:on 4:on 5:on 6:off
GUIのネットワークの設定のデバイスで各デバイスでNetworkManagerで管理するのチェックを外す
''ethtool''
ネットワークインターフェイスの状況を調べるコマンド
# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
Link detected: yes
''lspci''
# lspci
(略)
01:04.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)
01:04.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)
01:04.2 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 04)
01:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)
--------------------------------------------------------------------------------
RIGHT:[[元ページ:http://wwwism.dyndns.org/hp/linux/network.htm]]