ZTE 320 OLT Basic Setup: различия между версиями
Материал из noname.com.ua
Перейти к навигацииПерейти к поискуSirmax (обсуждение | вклад) (→manual) |
Sirmax (обсуждение | вклад) (→SNMP) |
||
| (не показано 11 промежуточных версий этого же участника) | |||
| Строка 7: | Строка 7: | ||
=Базовые настройки ZTE C320= |
=Базовые настройки ZTE C320= |
||
Это просто заметка что бы не забыть настройки |
Это просто заметка что бы не забыть настройки |
||
| + | =Timeouts= |
||
| + | Что бы не отлогинивало |
||
| + | <PRE> |
||
| + | line telnet idle-timeout 1000 |
||
| + | line console idle-timeout 1000 |
||
| + | </PRE> |
||
=Задать Hostname= |
=Задать Hostname= |
||
| Строка 40: | Строка 46: | ||
uplink-isolate disable |
uplink-isolate disable |
||
</PRE> |
</PRE> |
||
| + | |||
| + | |||
| + | =Сохранить файлы и патчи= |
||
| + | |||
| + | <PRE> |
||
| + | file-server boot-server ftp ipaddress 172.31.0.1 user zte3 password <пароль в открытом виде> |
||
| + | </PRE> |
||
| + | <PRE> |
||
| + | file upload patch etghgv210t37_r13.pat |
||
| + | </PRE> |
||
| + | или все сразу |
||
| + | file upload patch * |
||
=Backup= |
=Backup= |
||
| − | == |
+ | ==Manual== |
<PRE> |
<PRE> |
||
file-server manual-backup all server-index 1 ftp ipaddress 172.31.0.1 path backups user zte3 password <пароль в открытом виде> |
file-server manual-backup all server-index 1 ftp ipaddress 172.31.0.1 path backups user zte3 password <пароль в открытом виде> |
||
| Строка 62: | Строка 80: | ||
</PRE> |
</PRE> |
||
| + | ==На стороне сервера== |
||
| − | =5= |
||
| + | * <code>vsftpd</code> |
||
| + | * <code>/etc/passwd</code> что то вроде <code>zte:x:1002:1002::/tftpboot/z:/usr/sbin/nologin</code> и задать пароль. |
||
| + | * Пример конфига |
||
<PRE> |
<PRE> |
||
| + | listen=YES |
||
| + | listen_ipv6=NO |
||
| + | listen_address=172.31.0.1 |
||
| + | anonymous_enable=NO |
||
| + | local_enable=YES |
||
| + | write_enable=YES |
||
| + | local_umask=022 |
||
| + | anon_upload_enable=NO |
||
| + | anon_mkdir_write_enable=NO |
||
| + | # go into a certain directory. |
||
| + | dirmessage_enable=YES |
||
| + | use_localtime=YES |
||
| + | xferlog_enable=YES |
||
| + | connect_from_port_20=YES |
||
| + | #chown_uploads=YES |
||
| + | #chown_username=whoever |
||
| + | xferlog_file=/var/log/vsftpd.log |
||
| + | log_ftp_protocol=YES |
||
| + | idle_session_timeout=600 |
||
| + | data_connection_timeout=120 |
||
| + | #nopriv_user=ftpsecure |
||
| + | #async_abor_enable=YES |
||
| + | #ascii_upload_enable=YES |
||
| + | #ascii_download_enable=YES |
||
| + | #ftpd_banner=Welcome to blah FTP service. |
||
| + | #deny_email_enable=YES |
||
| + | # (default follows) |
||
| + | #banned_email_file=/etc/vsftpd.banned_emails |
||
| + | chroot_local_user=NO |
||
| + | #chroot_local_user=YES |
||
| + | #chroot_list_enable=YES |
||
| + | # (default follows) |
||
| + | #chroot_list_file=/etc/vsftpd.chroot_list |
||
| + | #ls_recurse_enable=YES |
||
| + | secure_chroot_dir=/var/run/vsftpd/empty |
||
| + | pam_service_name=vsftpd |
||
| + | rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem |
||
| + | rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key |
||
| + | ssl_enable=NO |
||
</PRE> |
</PRE> |
||
| + | =<code>Clock/TimeZone/NTP</code>= |
||
| − | =6= |
||
| + | ==TZ== |
||
<PRE> |
<PRE> |
||
| + | clock timezone KIEV 3 |
||
| + | </PRE> |
||
| + | ==NTP== |
||
| + | Проверяем текущие настройки: |
||
| + | <PRE> |
||
| + | sh ntp config |
||
| + | </PRE> |
||
| + | <PRE> |
||
| + | sh ntp config |
||
| + | ntp :disabled |
||
| + | ntp client :disabled |
||
| + | ntp authenticate :disabled |
||
| + | ntp poll interval :6 |
||
| + | ntp master :disabled |
||
| + | ntp threshold :7s |
||
</PRE> |
</PRE> |
||
| − | =7= |
||
<PRE> |
<PRE> |
||
| + | sh clock |
||
| + | </PRE> |
||
| + | |||
| + | <PRE> |
||
| + | 15:38:24 Sat Oct 6 2001 KIEV |
||
| + | </PRE> |
||
| + | Из-за большой разницы по времени (по дефолту там может быть 2003-й, 2001-й или 1970ый год) шасси может не синхронизироваться с NTP-сервером, |
||
| + | поэтому сразу выставляем время/дату вручную: |
||
| + | <PRE> |
||
| + | clock set 11:42:30 mar 23 2026 |
||
| + | </PRE> |
||
| + | <BR> |
||
| + | <PRE> |
||
| + | show clock |
||
| + | 11:42:34 Mon Mar 23 2026 KIEV |
||
| + | </PRE> |
||
| + | |||
| + | Затем включаем <code>ntp</code> и <code>ntp client</code> (без клиента синхронизации не будет), а также адреса NTP-серверов: |
||
| + | <PRE> |
||
| + | ntp enable |
||
| + | </PRE> |
||
| + | <PRE> |
||
| + | ntp client |
||
| + | </PRE> |
||
| + | <PRE> |
||
| + | ntp server 172.31.100.2 priority 1 |
||
| + | </PRE> |
||
| + | Немного ждём и проверяем, в случае удачи увидим изменения в Delay и Offset |
||
| + | <PRE> |
||
| + | #sh ntp associations |
||
| + | ------------------------------------------------------ |
||
| + | Session ID : 0 |
||
| + | Remote address : 172.31.100.2 |
||
| + | Local address : |
||
| + | Peer reference : 0.0.0.0 |
||
| + | Interface name : |
||
| + | Mode : client |
||
| + | Flag : persistent |
||
| + | Key id : 0 |
||
| + | Version : 3 |
||
| + | Peer poll : 17 |
||
| + | Lock : 0 |
||
| + | Priority : 1 |
||
| + | Peer stratum : 16 |
||
| + | Reach : 0 |
||
| + | Delay : 0.000000 |
||
| + | Offset : 0.000000 |
||
| + | </PRE> |
||
| + | либо так: |
||
| + | <PRE> |
||
| + | #sh ntp status |
||
| + | Clock is unsynchronized, stratum 0, reference is LOCAL |
||
| + | nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**16 |
||
| + | reference time is 11:42:30 Mon Mar 23 2026 KIEV(ed6b7b76.0) |
||
| + | clock offset is 0.00, root delay is 0.00 |
||
| + | root dispersion is 0.00, peer dispersion is 0.00 |
||
| + | </PRE> |
||
| + | |||
| + | =<code>auto-write enable</code>= |
||
| + | <PRE> |
||
| + | auto-write enable |
||
| + | auto-write 14:00:00 everyday |
||
| + | </PRE> |
||
| + | |||
| + | =<code>SNMP</code>= |
||
| + | <PRE> |
||
| + | mib-compatibility iftable v2 |
||
| + | </PRE> |
||
| + | <PRE> |
||
| + | snmp-server community snmp_mngm_ro ro |
||
| + | </PRE> |
||
| + | <PRE> |
||
| + | snmp-server location 5Gor |
||
| + | snmp-server contact +38067341XXXX Mazur Max |
||
| + | </PRE> |
||
| + | =Syslog= |
||
| + | <PRE> |
||
| + | syslog facility local0 |
||
| + | syslog severity 6 |
||
| + | syslog hostname-field hostname |
||
| + | syslog-server host enable mng 172.31.100.3 fport 514 lport 514 alarmlog level notification cmdlog snmplog ALL igmplog facility local0 local1 local2 |
||
</PRE> |
</PRE> |
||
| + | =Профиля GPON= |
||
| − | =8= |
||
| + | Короткие имена и длинные |
||
<PRE> |
<PRE> |
||
| + | gpon |
||
| + | profile tcont GPON-1G type 4 maximum 1000000 |
||
| + | profile tcont PROFILE-TCONT-UP-1Mb type 4 maximum 1024 |
||
| + | profile tcont PROFILE-TCONT-UP-10Mb type 4 maximum 10240 |
||
| + | profile tcont PROFILE-TCONT-UP-100Mb type 4 maximum 102400 |
||
| + | profile tcont PROFILE-TCONT-UP-1000Mb type 4 maximum 1024000 |
||
| + | profile tcont PROFILE-TCONT-UP-150Mb type 4 maximum 152400 |
||
| + | profile tcont 1M type 4 maximum 1024 |
||
| + | profile tcont 10M type 4 maximum 10240 |
||
| + | profile tcont 100M type 4 maximum 102400 |
||
| + | profile tcont 1G type 4 maximum 1024000 |
||
| + | profile tcont 150M type 4 maximum 152400 |
||
| + | profile tcont 1000M type 4 maximum 1024000 |
||
| + | profile traffic PROFILE-TRAFFIC-DOWN-1Mb sir 1024 pir 1024 |
||
| + | profile traffic PROFILE-TRAFFIC-DOWN-10Mb sir 1024 pir 10240 |
||
| + | profile traffic PROFILE-TRAFFIC-DOWN-100Mb sir 1024 pir 102400 |
||
| + | profile traffic PROFILE-TRAFFIC-DOWN-1000Mb sir 10240 pir 1024000 |
||
| + | profile traffic PROFILE-TRAFFIC-DOWN-150Mb sir 1524 pir 152400 |
||
| + | profile traffic 1M sir 1024 pir 1024 |
||
| + | profile traffic 10M sir 1024 pir 10240 |
||
| + | profile traffic 100Mb sir 1024 pir 102400 |
||
| + | profile traffic 1000Mb sir 10240 pir 1024000 |
||
| + | profile traffic 150Mb sir 1524 pir 152400 |
||
| + | profile traffic 100M sir 1024 pir 102400 |
||
| + | profile traffic 1000M sir 10240 pir 1024000 |
||
| + | profile traffic 150M sir 1524 pir 152400 |
||
</PRE> |
</PRE> |
||
| + | =Профиль PON= |
||
| − | =9= |
||
<PRE> |
<PRE> |
||
| + | pon |
||
| + | onu-type GPON_ONE_ETH_PORT gpon description "ONU_with_one_ethernet_interface" |
||
| + | onu-type-if GPON_ONE_ETH_PORT eth_0/1 |
||
| + | uncfg-onu-display-info model version mac sn pw rid |
||
| + | exit |
||
</PRE> |
</PRE> |
||
Текущая версия на 13:41, 23 марта 2026
Базовые настройки ZTE C320
Это просто заметка что бы не забыть настройки
Timeouts
Что бы не отлогинивало
line telnet idle-timeout 1000 line console idle-timeout 1000
Задать Hostname
hostname C320-5Gor
Включить telnet
no ssh server only
Базовый интерфейс управления
У меня менеджмент интерфейс не используется так как нет Out of Band Management
interface vlan 3100 ip address 172.31.1.253 255.255.255.0 description Management
Настройки interface gei_1/4/3
Имя интерфейса и vlan конечно зависят от обстоятельств
interface gei_1/4/3 no shutdown hybrid-attribute copper negotiation auto flowcontrol disable linktrap enable switchport mode trunk switchport vlan 1,3100 tag port-protect disable uplink-isolate disable
Сохранить файлы и патчи
file-server boot-server ftp ipaddress 172.31.0.1 user zte3 password <пароль в открытом виде>
file upload patch etghgv210t37_r13.pat
или все сразу file upload patch *
Backup
Manual
file-server manual-backup all server-index 1 ftp ipaddress 172.31.0.1 path backups user zte3 password <пароль в открытом виде>
backups- путь к папке, куда сохранять. Без / в начале- Пароль лучше записать так как я не знаю как его вставить, тут нет возможности указать что это уже хеш и если просто вставить строку второй раз будет двойное хеширование
Запустить бекап
manual-backup cfg
Auto
file-server auto-backup all server-index 1 ftp ipaddress 172.31.0.1 path auto-backup user zte password <пароль в открытом виде> auto-backup condition cfg-changed hold-off-time 1 max-hold-off-time 2
На стороне сервера
vsftpd/etc/passwdчто то вродеzte:x:1002:1002::/tftpboot/z:/usr/sbin/nologinи задать пароль.- Пример конфига
listen=YES listen_ipv6=NO listen_address=172.31.0.1 anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 anon_upload_enable=NO anon_mkdir_write_enable=NO # go into a certain directory. dirmessage_enable=YES use_localtime=YES xferlog_enable=YES connect_from_port_20=YES #chown_uploads=YES #chown_username=whoever xferlog_file=/var/log/vsftpd.log log_ftp_protocol=YES idle_session_timeout=600 data_connection_timeout=120 #nopriv_user=ftpsecure #async_abor_enable=YES #ascii_upload_enable=YES #ascii_download_enable=YES #ftpd_banner=Welcome to blah FTP service. #deny_email_enable=YES # (default follows) #banned_email_file=/etc/vsftpd.banned_emails chroot_local_user=NO #chroot_local_user=YES #chroot_list_enable=YES # (default follows) #chroot_list_file=/etc/vsftpd.chroot_list #ls_recurse_enable=YES secure_chroot_dir=/var/run/vsftpd/empty pam_service_name=vsftpd rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key ssl_enable=NO
Clock/TimeZone/NTP
TZ
clock timezone KIEV 3
NTP
Проверяем текущие настройки:
sh ntp config
sh ntp config ntp :disabled ntp client :disabled ntp authenticate :disabled ntp poll interval :6 ntp master :disabled ntp threshold :7s
sh clock
15:38:24 Sat Oct 6 2001 KIEV
Из-за большой разницы по времени (по дефолту там может быть 2003-й, 2001-й или 1970ый год) шасси может не синхронизироваться с NTP-сервером, поэтому сразу выставляем время/дату вручную:
clock set 11:42:30 mar 23 2026
show clock 11:42:34 Mon Mar 23 2026 KIEV
Затем включаем ntp и ntp client (без клиента синхронизации не будет), а также адреса NTP-серверов:
ntp enable
ntp client
ntp server 172.31.100.2 priority 1
Немного ждём и проверяем, в случае удачи увидим изменения в Delay и Offset
#sh ntp associations ------------------------------------------------------ Session ID : 0 Remote address : 172.31.100.2 Local address : Peer reference : 0.0.0.0 Interface name : Mode : client Flag : persistent Key id : 0 Version : 3 Peer poll : 17 Lock : 0 Priority : 1 Peer stratum : 16 Reach : 0 Delay : 0.000000 Offset : 0.000000
либо так:
#sh ntp status Clock is unsynchronized, stratum 0, reference is LOCAL nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**16 reference time is 11:42:30 Mon Mar 23 2026 KIEV(ed6b7b76.0) clock offset is 0.00, root delay is 0.00 root dispersion is 0.00, peer dispersion is 0.00
auto-write enable
auto-write enable auto-write 14:00:00 everyday
SNMP
mib-compatibility iftable v2
snmp-server community snmp_mngm_ro ro
snmp-server location 5Gor snmp-server contact +38067341XXXX Mazur Max
Syslog
syslog facility local0 syslog severity 6 syslog hostname-field hostname syslog-server host enable mng 172.31.100.3 fport 514 lport 514 alarmlog level notification cmdlog snmplog ALL igmplog facility local0 local1 local2
Профиля GPON
Короткие имена и длинные
gpon profile tcont GPON-1G type 4 maximum 1000000 profile tcont PROFILE-TCONT-UP-1Mb type 4 maximum 1024 profile tcont PROFILE-TCONT-UP-10Mb type 4 maximum 10240 profile tcont PROFILE-TCONT-UP-100Mb type 4 maximum 102400 profile tcont PROFILE-TCONT-UP-1000Mb type 4 maximum 1024000 profile tcont PROFILE-TCONT-UP-150Mb type 4 maximum 152400 profile tcont 1M type 4 maximum 1024 profile tcont 10M type 4 maximum 10240 profile tcont 100M type 4 maximum 102400 profile tcont 1G type 4 maximum 1024000 profile tcont 150M type 4 maximum 152400 profile tcont 1000M type 4 maximum 1024000 profile traffic PROFILE-TRAFFIC-DOWN-1Mb sir 1024 pir 1024 profile traffic PROFILE-TRAFFIC-DOWN-10Mb sir 1024 pir 10240 profile traffic PROFILE-TRAFFIC-DOWN-100Mb sir 1024 pir 102400 profile traffic PROFILE-TRAFFIC-DOWN-1000Mb sir 10240 pir 1024000 profile traffic PROFILE-TRAFFIC-DOWN-150Mb sir 1524 pir 152400 profile traffic 1M sir 1024 pir 1024 profile traffic 10M sir 1024 pir 10240 profile traffic 100Mb sir 1024 pir 102400 profile traffic 1000Mb sir 10240 pir 1024000 profile traffic 150Mb sir 1524 pir 152400 profile traffic 100M sir 1024 pir 102400 profile traffic 1000M sir 10240 pir 1024000 profile traffic 150M sir 1524 pir 152400
Профиль PON
pon onu-type GPON_ONE_ETH_PORT gpon description "ONU_with_one_ethernet_interface" onu-type-if GPON_ONE_ETH_PORT eth_0/1 uncfg-onu-display-info model version mac sn pw rid exit