一) 概述:
利用RH
內部網絡機器的IP地址將由網關所在機器自動分配
(二) 硬件設備:
ISP VDSL MODEM(以太網口MEDEM)一個(其他ADSL也應該可以)
(三) 操作系統:
RedHat
(四) 配置者身份:
root
(五) 配置過程:
網卡設備選擇與VDSL MODEM相連的網卡
直接選擇應用
也可以在
靜態IP
Linux下用ifconfig獲得
ppp
inet addr:
修改/etc/nf
#Start of /etc/nf
ddns
ignore client
subnet
#
option routers
option subnet
option nis
option domain
#
option domain
option time
#
#
# option netbios
range dynamic
default
max
}
#End of /etc/nf
不要把
正確的應該如上: range dynamic
# Generated by iptables
*mangle
:PREROUTING ACCEPT [
:INPUT ACCEPT [
:FORWARD ACCEPT [
:OUTPUT ACCEPT [
:POSTROUTING ACCEPT [
COMMIT
# Completed on Tue Oct
# Generated by iptables
*nat
:PREROUTING ACCEPT [
:POSTROUTING ACCEPT [
:OUTPUT ACCEPT [
[
COMMIT
# Completed on Tue Oct
# Generated by iptables
*filter
:INPUT ACCEPT [
:FORWARD ACCEPT [
:OUTPUT ACCEPT [
COMMIT
# Completed on Tue Oct
net
如此一來
輸入以下命令行:
[jackey@localhost jackey]$ su
Password:
[root@localhost jackey]# cd /etc/init
[root@localhost init
[root@localhost init
(
[jackey@localhost jackey]$ ifconfig
eth
UP BROADCAST RUNNING MULTICAST MTU:
RX packets:
TX packets:
collisions:
RX bytes:
Interrupt:
eth
inet addr:
UP BROADCAST RUNNING MULTICAST MTU:
RX packets:
TX packets:
collisions:
RX bytes:
Interrupt:
lo Link encap:Local Loopback
inet addr:
UP LOOPBACK RUNNING MTU:
RX packets:
TX packets:
collisions:
RX bytes:
ppp
inet addr:
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:
RX packets:
TX packets:
collisions:
RX bytes:
其中XX:XX:XX:XX:XX:XX是你網卡的物理地址
(
[jackey@localhost jackey]$ route
[b]Kernel IP routing table
[b]Destination Gateway Genmask Flags Metric Ref Use Iface
(
[root@localhost jackey]# iptables
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
(
[jackey@localhost jackey]$ cat /proc/sys/net/ipv
From:http://tw.wingwit.com/Article/program/Oracle/201311/17825.html