来自 XFCE GUI 的静态 IP 地址

来自 XFCE GUI 的静态 IP 地址

我感兴趣的是IOGear 通用 Wi-Fi N 适配器作为 wifi 适配器。 详细的手册指出:

Installation without WPS - Mac 
Step 1: Turn off your computer’s wireless connection (if applicable) and disconnect the Ethernet cable currently connect to your computer (if applicable). 
Step 2: Use both the included RJ-45 Ethernet cable and the USB cable to connect the
WiFi adapter with your computer. 
Step 3: Set your computer with a static IP address. a. Open system preferences and select “Network”. 
b. Select your Ethernet connection in the left pane. Next change configure to Manual and enter IP address 192.168.1.100 and Subnet Mask 255.255.255.0. Remove any entries in the Router and DNS boxes then click Apply. 
Step 4: Open your web browser and enter 192.168.1.252.
This will bring up the configuration utility. Click “Site Survey” to
scan for your wireless network.

我正在使用 XFCE,并希望使用 GUI 设置如上所述的 IP 地址:

网络连接

但是,我怎么知道上面的设置正在被使用呢? ifconfig 实用程序报告IPv6 类型地址且无 IPv4 信息。我有点困惑,GUI 显示的数据和 CLI 似乎给出不同的结果。GUI 如何与 ifconfig 结果相关联?ifconfig 结果与 GUI 设置不匹配似乎很奇怪。

(由于发生此情况的计算机无法访问互联网,因此提供数据有些困难。)

我没有很多“标准”的 Ubuntu 选项,只有裸 XFCE。

输入ifconfig eth0 downifconfig eth0 up结果为 IPv6 类型地址

答案1

我的路由器设置如下:

Router Status
Hardware Version    WNR1000v2
Firmware Version    V1.0.1.1NA
GUI Language Version    V1.0.0.35
Internet Port
MAC Address     C0:3F:0E:8B:4D:05
IP Address  192.168.0.16
Internet    DHCP
IP Subnet Mask  255.255.255.0
Domain Name Server  64.59.144.18
64.59.150.134
LAN Port
MAC Address     C0:3F:0E:8B:4D:04
IP Address  192.168.1.1
DHCP    ON
IP Subnet Mask  255.255.255.0
Wireless Port
Name (SSID)     NETGEAR
Region  United States
Channel     Auto ( 2(P)+6(S) )
Mode    Up to 150 Mbps
Wireless AP     ON
Broadcast Name  ON
Wi-Fi Protected Setup   Not Configured

将 IOGear 通用 Wi-Fi N 适配器连接到路由器上的黄色“互联网”端口。现在,配置 IOGear 设备有点棘手,我不知道细节,但一般来说就是这样:

Access Point Status
This page shows the current status and some basic settings of the device.

System
Uptime  0day:0h:22m:34s
Firmware Version    AC1x1-1201-B03
Build Time  Thu Jun 23 17:42:14 CST 2011
Wireless Configuration  
Mode        Infrastructure Client   
Band        2.4 GHz (B+G+N)
SSID    

425BF3

Channel Number      11  
Encryption      WPA2
BSSID   70:54:d2:36:b7:05
Status  Connected
Wireless Configuration  
Mode        Infrastructure Client   
Band        2.4 GHz (B+G+N)
SSID    

425BF3

Channel Number      11  
Encryption      WPA2
BSSID   70:54:d2:36:b7:05
Status  Connected
TCP/IP Configuration
Attain IP Protocol  Fixed IP
IP Address  192.168.1.252
Subnet Mask     255.255.255.0
Default Gateway     0.0.0.0
DHCP Server     Disabled
MAC Address     00:21:79:c6:5a:de

这很奇怪,因为默认网关是 0.0.0.0,这毫无意义。我甚至尝试将网关设置为:

thufir@dur:~$ 
thufir@dur:~$ cat /etc/network/interfaces.static 
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.252

# The secondary network interface
auto eth1
iface eth1 inet dhcp
thufir@dur:~$ 

/etc/network/interfaces即使这样做了,并运行service network stop然后启动,仍然无法将默认网关设置为非零地址。

神奇的是,或者看似如此,只需移动一些以太网电缆进行一些双 NAT 操作,现在 IOGear 就可以为计算机连接的路由器提供互联网连接。

很奇怪。我欢迎评论、建议和替代解决方案。

嗯,似乎路由器正在自动配置静态 IP 地址 - 尽管该地址可能会在 IOgear 设备启动时发生变化(我不确定):

在此处输入图片描述

相关内容