网络和路由

padavan中asterisk的配置

asterisk的配置文件在optetcasterisk,共21个文件:

  • acl.conf
  • asterisk.conf
  • ccss.conf
  • cel.conf
  • cli.conf
  • cli_permissions.conf
  • codecs.conf
  • dnsmgr.conf
  • dsp.conf
  • extconfig.conf
  • extensions.conf //拨号规则
  • features.conf //自定义按键配置,系统默认的功能键
  • http.conf //WEB界面相关
  • indications.conf
  • logger.conf //日志
  • manager.conf //WEB界面相关
  • modules.conf //系统启动时加载的模块
  • res_config_sqlite3.conf //数据库配置
  • stasis.conf
  • udptl.conf
  • users.conf

padavan安装asterisk

  1. 进入路由器后台:扩展功能》配置扩展环境:打开以下三个开关:

    • 启用 opt 自动更新
    • 启用 扩展脚本 自动更新
    • opt 强制安装
  2. 进入SSH后台执行以下命令:

    [JDC-1 /opt/home/admin]# opkg update

    [JDC-1 /opt/home/admin]# opkg install libopenssl

    [JDC-1 /opt/home/admin]# opkg install asterisk

linux中的网络接口

  • br:网桥
  • eth: 网卡(路由器网口)

    • eth0:路由器lan口
    • eth1:路由器wan口
  • lo:回环接口(127.0.0.1)
  • ppp:ppp连接(点对点连接)
  • ra:无线接口(2.4G)
  • rai:无线接口(5G)
  • wlan:无线接口
  • wds:无线分布系统(2.4G)
  • wdsi:无线分布系统(5G)
  • apcli/apclii:AP CLIENT
  • SIT:IPv6-in-IPv4 tunnel interfaces

张家口电信宽带IPV6

更新:目前家宽IPV6功能已正常。

[JDC-1 /opt/home/admin]# ping 240c::6666
PING 240c::6666 (240c::6666): 56 data bytes
64 bytes from 240c::6666: seq=0 ttl=53 time=30.980 ms
64 bytes from 240c::6666: seq=1 ttl=53 time=30.440 ms
64 bytes from 240c::6666: seq=2 ttl=53 time=30.760 ms
64 bytes from 240c::6666: seq=3 ttl=53 time=30.580 ms
64 bytes from 240c::6666: seq=4 ttl=53 time=30.400 ms
64 bytes from 240c::6666: seq=5 ttl=53 time=30.640 ms
^C
--- 240c::6666 ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 30.400/30.633/30.980 ms

路由器设置IPV6后无法正常上网,最远只能到达DNS:
240e:4c:4808::1
240e:4c:4008::1
今天抽中午的时间,电脑直连光猫,新建PPPOE拨号,情况依旧,记录信息如下:

C:\Users\Administrator>ipconfig -all

Windows IP 配置

   /*此处省略*/

PPP 适配器 宽带连接:

   连接特定的 DNS 后缀 . . . . . . . :
   描述. . . . . . . . . . . . . . . : 宽带连接
   物理地址. . . . . . . . . . . . . :
   DHCP 已启用 . . . . . . . . . . . : 否
   自动配置已启用. . . . . . . . . . : 是
   IPv6 地址 . . . . . . . . . . . . : 240e:340:6b17:eb75:b8f3:7b91:e7ff:57ff(首选)
   本地链接 IPv6 地址. . . . . . . . : fe80::b8f3:7b91:e7ff:57ff%21(首选)
   IPv4 地址 . . . . . . . . . . . . : 123.180.146.118(首选)
   子网掩码  . . . . . . . . . . . . : 255.255.255.255
   默认网关. . . . . . . . . . . . . : fe80::2a68:d2ff:fe00:fad%21
                                       0.0.0.0
   DHCPv6 IAID . . . . . . . . . . . : 362179360
   DHCPv6 客户端 DUID  . . . . . . . : 00-01-00-01-21-3A-67-1A-2C-D0-5A-EB-83-7F

   DNS 服务器  . . . . . . . . . . . : 222.222.202.202
                                       222.222.222.222
   TCPIP 上的 NetBIOS  . . . . . . . : 已禁用

路由表:

C:\Users\Administrator>route print
===========================================================================
接口列表
 21...........................宽带连接
 12...28 d2 44 10 27 d9 ......Realtek PCIe GBE Family Controller
  1...........................Software Loopback Interface 1
===========================================================================

IPv4 路由表
===========================================================================
/*此处省略*/
===========================================================================
永久路由:
  无
IPv6 路由表
===========================================================================
活动路由:
 如果跃点数网络目标      网关
 21    266 ::/0                     fe80::2a68:d2ff:fe00:fad
  1   4531 ::1/128                  在链路上
 21     18 240e:340:6b17:eb75::/64  在链路上
 21    266 240e:340:6b17:eb75:b8f3:7b91:e7ff:57ff/128
                                    在链路上
 12   4491 fe80::/64                在链路上
 21    266 fe80::/64                在链路上
 21    266 fe80::b8f3:7b91:e7ff:57ff/128                                    在链路上
 12   4491 fe80::e81f:5346:8a3:8319/128                                    在链路上
  1   4531 ff00::/8                 在链路上
 12   4491 ff00::/8                 在链路上
 21    266 ff00::/8                 在链路上
===========================================================================
永久路由:
  无

AX1800PRO开启SSH

参考资料:https://www.bilibili.com/read/cv15885352/
ROM版本: JDC02-1.5.32.r2165

    $.ajax({
    url: 'http://' + $.cookie("HostAddrIP") + '/jdcapi',
    async: false,
    data: JSON.stringify({
        jsonrpc: "2.0",
        id: 1,
        method: "call",
        params: [
            $.cookie("sessionid"),
            "service",
            "set",
            {
                "name": "dropbear",
                "instances": {"instance1": {"command": ["/usr/sbin/dropbear"]}}
            }
        ]
    }),
    dataType: 'json',
    type: 'POST'
}) 作者:cdlif https://www.bilibili.com/read/cv15885352/ 出处:bilibili

jdc2.PNG
将 dropbear 添加到 /etc/rc.local实现开机启动,下次开机可直接进入。
dropbear.PNG