OPENWRT Installation and Practice II

Source: Internet
Author: User

1. After starting the OpenWrt virtual machine above Ubuntu, set up the network card of the virtual machine:

1th Network card: host-only

2nd Nic: NAT

2. View the network configuration:

[Email protected]:/etc/config# Cat Network

Config interface ' loopback '
Option ifname ' lo '
Option Proto ' Static '
Option ipaddr ' 127.0.0.1 '
Option netmask ' 255.0.0.0 '

Config interface ' LAN '
OPTION ifname ' eth0 '
Option type ' bridge '
Option Proto ' Static '
Option ipaddr ' 192.168.1.254 '
Option netmask ' 255.255.255.0 '
Option Ip6assign ' 60 '

Config interface ' Wan '
OPTION ifname ' eth1 '
Option Proto ' DHCP '

Config interface ' wan6 '
OPTION ifname ' eth1 '
Option Proto ' DHCPv6 '

Config globals ' globals '
Option Ula_prefix ' FD43:E822:82CF::/48 '

With the Ifconfig|grep addr command, you can see that the IP of eth1 is 192.168.127.129:

[Email protected]:/etc/config# ifconfig|grep Add
Br-lan Link encap:ethernet HWaddr 00:0C:29:09:43:FB
inet addr:192.168.1.254 bcast:192.168.1.255 mask:255.255.255.0
Inet6 ADDR:FD43:E822:82CF::1/60 Scope:global
Inet6 ADDR:FE80::20C:29FF:FE09:43FB/64 Scope:link
Eth0 Link encap:ethernet HWaddr 00:0C:29:09:43:FB
Interrupt:19 Base address:0x2000
eth1 Link encap:ethernet HWaddr 00:0c:29:09:43:05
inet addr:192.168.127.129 bcast:192.168.127.255 mask:255.255.255.0
Inet6 ADDR:FE80::20C:29FF:FE09:4305/64 Scope:link
Interrupt:19 Base address:0x2080
inet addr:127.0.0.1 mask:255.0.0.0
Inet6 addr::: 1/128 scope:host

3. Check to see if you can access the network:

[Email protected]:/etc/config# Ping baidu.com
PING baidu.com (111.13.101.208): Data bytes
Bytes from 111.13.101.208:seq=0 ttl=128 time=46.149 ms
Bytes from 111.13.101.208:seq=1 ttl=128 time=47.142 ms
^c
---baidu.com ping statistics---
2 packets transmitted, 2 packets received, 0% packet loss
Round-trip Min/avg/max = 46.149/46.645/47.142 ms

Upgrade your Luci:

OPKG Update

Opkg Install Luci

/ETC/INIT.D/UHTTPD Enable

/ETC/INIT.D/UHTTPD start

/etc/init.d/firewall stop

Then turn on the firewall.

You can then open Luci on Windows.

Next, you can toss in the Web interface ...

OPENWRT Installation and Practice II

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.